OpenCores
Issue List
generic FIFO CDC problem #1
Closed gil.moran opened this issue over 14 years ago
gil.moran commented over 14 years ago

The generic_fifo_ctrl module synchronizes gray representation of the read and write pointers. The gray representation is coming from combinational bin2gray function instead of DFF output.

This method may generate a static hazard that gets synchronized by the other clock domain and violates the gray pointer principle of single bit flip.

For safe coding the gray representation on the source clock domain should be sampled. To get cycle accurate behavior of the original design sample the bin2gray conversion of the next binary pointer value in parallel to sampling the binary pointer itself.

antanguay commented about 13 years ago

Fixed.

antanguay closed this about 13 years ago
southwave commented over 12 years ago

type ./compile.sh in command line, there are errors found (shown as below). Can you help to debug?

../../../tbench/systemc/sc_main.cpp:149: error: no match for call to (sc_core::sc_out<uint64_t>) (sc_core::sc_signal<sc_dt::sc_bv<64> >&)' /usr/local/systemc-2.2/include/sysc/communication/sc_port.h:311: note: candidates are: void sc_core::sc_port_b<IF>::operator()(IF&) [with IF = sc_core::sc_signal_inout_if<uint64_t>] /usr/local/systemc-2.2/include/sysc/communication/sc_port.h:320: note: void sc_core::sc_port_b<IF>::operator()(sc_core::sc_port_b<IF>&) [with IF = sc_core::sc_signal_inout_if<uint64_t>] ../../../tbench/systemc/sc_main.cpp:225: error: no matching function for call toVxge_mac::trace(SpTraceFile&, int)' ./Vxge_mac.h:394: note: candidates are: void Vxge_mac::trace(VerilatedVcdC, int, int) make: sc_main.o Error 1 g++ -I.. -I. -I/usr/local/systemc-2.2/include -I/root/ethernet_10ge_mac/verilator/SystemPerl-1.337/src -I. -MMD -I/root/ethernet_10ge_mac/verilator/verilator-3.813/include -I/root/ethernet_10ge_mac/verilator/verilator-3.813/include/vltstd -DVL_PRINTF=printf -DVM_TRACE=1 -DVM_COVERAGE=0 -I/usr/local/systemc-2.2/include -c -o verilated.o /root/ethernet_10ge_mac/verilator/verilator-3.813/include/verilated.cpp make: No rule to make target SpTraceVcd.o'. Stop. make: *** No rule to make targetSpTraceVcdC.o'. Stop. g++: sc_main.o: No such file or directory g++: SpTraceVcdC.o: No such file or directory g++: SpTraceVcd.o: No such file or directory


Assignee
No one
Labels
Bug