Chapter 9 -- SystemC From Gound 读书心得

来源:互联网 发布:Ubuntu查看CPU 编辑:程序博客网 时间:2024/06/05 21:03

Evaluate -  update Channel:  sc_signal.

1. notify(SC_ZERO_TIME), the notification 发生在 evaluation结束后的update phase.

 

2. sc_signal<T> 也是systemC的 primitive channel, 他利用request-update作为同步的机制。

 

 3. sc_signal<T>重载了=,但不建议使用,这样比较危险。

 

4. sc_buffer<T> 类似于 sc_signal<T> 是 evaluate-update channel. 而且在一个delta cycle内只允许single process 写,不允许多个process写。

 

5. systemc引入了sc_signal_resolved,  sc_signal_rv<WIDTH>来解决multiple writer的问题(即bus has contention or high Z)。 有点类似于 sc_signal<sc_logic> 唯一的区别是但是允许multiple writer。

 

6) 对于sc_signal<bool> 还有 signame.posedge_event,  signame.negedge_event.

 

7) request update 讲解

当一个process调用write method时,write method先将值写入New value存储区域,然后调用sc_primitive_channel::request_update() method 来通知simulation kernel。当 update phase 到来时,kernel 自动调用曾在evaluation phase 时请求更新(request update) 的channel 中的 update()method。这个update() method不光拷贝new value 到current value,而且会解决竞争,以及notify一些事件从而唤醒某些进程。

 

原创粉丝点击