0

I am using Sync in the following way:

sync true (ports.ocp_cmd$ == 3'b010);

I want the simulator to go to the next command the same cycle the data in ocp_cmd is 010. currently the simulator automatically jumps 1 cycle and only then goes to the next specman command.

How can I change my command line so that no delay is created (so that I will be able to raise the ack signal in the same cycle if desired)

Mohit Kanwar
  • 2,962
  • 7
  • 39
  • 59
tom
  • 31
  • 6

2 Answers2

0

Since the sync true statement must reside in a time consuming method. Compare when the sampling event - for the time consuming method - occurs relative to the change in ocp_cmd becoming 3'b010. It could be that you must modify your sampling event.

Uima
  • 1
0

I guess what you mean that you sample ocp_cmd at the rising edge of the clock and this means you are raising ocp_read starting with that clock, which means the two signals will have a 1 cycle delay between each other.

If you know ocp_cmd doesn't glitch, you can change your sync to sync true (ports.ocp_cmd$ == 3'b010) @sim.

This isn't proper practice when working with synchronous signals. You'd be better of monitoring the cause of ocp_cmd going to 010 and relying on that.

Tudor Timi
  • 7,453
  • 1
  • 24
  • 53