Double-step() after clock posedge to workaround CXXRTL port propagation issue
This commit is contained in:
parent
ce5cc1f150
commit
2618ae0c07
|
@ -161,6 +161,7 @@ int main(int argc, char **argv) {
|
||||||
top.p_trst__n.set<bool>(true);
|
top.p_trst__n.set<bool>(true);
|
||||||
top.p_rst__n.set<bool>(true);
|
top.p_rst__n.set<bool>(true);
|
||||||
top.step();
|
top.step();
|
||||||
|
top.step(); // workaround for github.com/YosysHQ/yosys/issues/2780
|
||||||
|
|
||||||
for (int64_t cycle = 0; cycle < max_cycles || max_cycles == 0; ++cycle) {
|
for (int64_t cycle = 0; cycle < max_cycles || max_cycles == 0; ++cycle) {
|
||||||
top.p_clk.set<bool>(false);
|
top.p_clk.set<bool>(false);
|
||||||
|
@ -169,6 +170,7 @@ int main(int argc, char **argv) {
|
||||||
vcd.sample(cycle * 2);
|
vcd.sample(cycle * 2);
|
||||||
top.p_clk.set<bool>(true);
|
top.p_clk.set<bool>(true);
|
||||||
top.step();
|
top.step();
|
||||||
|
top.step(); // workaround for github.com/YosysHQ/yosys/issues/2780
|
||||||
|
|
||||||
// Most bitbang commands complete in one cycle (e.g. TCK/TMS/TDI
|
// Most bitbang commands complete in one cycle (e.g. TCK/TMS/TDI
|
||||||
// writes) but reads take 0 cycles, step=false.
|
// writes) but reads take 0 cycles, step=false.
|
||||||
|
|
|
@ -122,6 +122,7 @@ int main(int argc, char **argv) {
|
||||||
top.p_clk.set<bool>(false);
|
top.p_clk.set<bool>(false);
|
||||||
top.p_rst__n.set<bool>(true);
|
top.p_rst__n.set<bool>(true);
|
||||||
top.step();
|
top.step();
|
||||||
|
top.step(); // workaround for github.com/YosysHQ/yosys/issues/2780
|
||||||
|
|
||||||
for (int64_t cycle = 0; cycle < max_cycles; ++cycle) {
|
for (int64_t cycle = 0; cycle < max_cycles; ++cycle) {
|
||||||
top.p_clk.set<bool>(false);
|
top.p_clk.set<bool>(false);
|
||||||
|
@ -130,6 +131,7 @@ int main(int argc, char **argv) {
|
||||||
vcd.sample(cycle * 2);
|
vcd.sample(cycle * 2);
|
||||||
top.p_clk.set<bool>(true);
|
top.p_clk.set<bool>(true);
|
||||||
top.step();
|
top.step();
|
||||||
|
top.step(); // workaround for github.com/YosysHQ/yosys/issues/2780
|
||||||
// Handle current data phase, then move current address phase to data phase
|
// Handle current data phase, then move current address phase to data phase
|
||||||
uint32_t rdata = 0;
|
uint32_t rdata = 0;
|
||||||
if (bus_trans && bus_write) {
|
if (bus_trans && bus_write) {
|
||||||
|
|
Loading…
Reference in New Issue