ef1e52323f895fad56bf1134830f44d976fed9c9
[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 /*
22 bool cur_led = top.p_led.get<bool>();
23 uint32_t counter = top.p_counter.get<uint32_t>();
24
25 if (cur_led != prev_led){
26 cout << "cycle " << cycle << " - led: " << cur_led << ", counter: " << counter << endl;
27 }
28 prev_led = cur_led;
29 */
30 }
31 }
32