check the output is correct
[soc-cxxrtl-sim.git] / small_jtag_test / main.cpp
1
2 #include <iostream>
3 #include "add.cpp"
4
5 using namespace std;
6
7 int main()
8 {
9 cxxrtl_design::p_add top;
10
11 bool prev_led = 0;
12
13 top.step();
14 for(int cycle=0;cycle<1000;++cycle){
15
16 top.p_clk.set<bool>(false);
17 top.step();
18 top.p_clk.set<bool>(true);
19 top.step();
20
21 // check that the output is correct
22 /*
23 top.p_a.set<uint8_t>(5);
24 top.p_b.set<uint8_t>(3);
25 uint32_t f = top.p_f.get<uint32_t>();
26
27 cout << "f " << f << endl;
28 */
29 }
30 }
31