Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
intro_example:standard_sim [2025/05/14 18:30] – rajit | intro_example:standard_sim [2025/05/14 18:40] (current) – rajit | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
Simulating CHP programs often requires creating an environment to inject data into the circuit being tested, and an environment that reads the outputs of the circuit to check their values. '' | Simulating CHP programs often requires creating an environment to inject data into the circuit being tested, and an environment that reads the outputs of the circuit to check their values. '' | ||
Line 47: | Line 47: | ||
[ 140] < | [ 140] < | ||
[ 140] < | [ 140] < | ||
+ | </ | ||
+ | |||
+ | Instead of using a hard-coded set of values in the the test environment, | ||
+ | <code act> | ||
+ | sim:: | ||
+ | 0 /* file ID */, | ||
+ | false /* don't loop file contents */, | ||
+ | 0 /* source ID */, | ||
+ | false /* turn off verbose logs */> | ||
+ | t1(b.I); | ||
+ | </ | ||
+ | instead of a '' | ||
+ | |||
+ | <file txt _infile_.0> | ||
+ | 0x493 | ||
+ | 0x29 | ||
+ | 0x3 | ||
+ | 4 | ||
+ | </ | ||
+ | |||
+ | The result is: | ||
+ | < | ||
+ | $ actsim -p test etest.act | ||
+ | WARNING: source_file< | ||
+ | WARNING: buffer<>: | ||
+ | WARNING: sink< | ||
+ | actsim> cycle | ||
+ | [ 50] < | ||
+ | [ 70] < | ||
+ | [ 90] < | ||
+ | [ 110] < | ||
+ | [ 110] < | ||
</ | </ |