working stop watch
This commit is contained in:
@@ -33,10 +33,9 @@ int main(int argc, char **argv) {
|
||||
tfp->open("build/waveform.vcd");
|
||||
|
||||
tb->i_resetN = 1;
|
||||
tb->i_start = 0;
|
||||
tb->i_stop = 0;
|
||||
tb->i_startN = 1;
|
||||
tb->i_stopN = 1;
|
||||
unsigned tickcount = 0;
|
||||
int last_led = tb->o_led;
|
||||
for (int k = 0; k < 2; k++)
|
||||
tick(++tickcount, tb, tfp);
|
||||
|
||||
@@ -47,16 +46,16 @@ int main(int argc, char **argv) {
|
||||
for (int k = 0; k < 3; k++)
|
||||
tick(++tickcount, tb, tfp);
|
||||
|
||||
tb->i_start = 1;
|
||||
tb->i_startN = 0;
|
||||
tick(++tickcount, tb, tfp);
|
||||
tb->i_start = 0;
|
||||
tb->i_startN = 1;
|
||||
|
||||
for (int k = 0; k < 15; k++)
|
||||
tick(++tickcount, tb, tfp);
|
||||
|
||||
tb->i_stop = 1;
|
||||
tb->i_stopN = 0;
|
||||
tick(++tickcount, tb, tfp);
|
||||
tb->i_stop = 0;
|
||||
tb->i_stopN = 1;
|
||||
|
||||
for (int k = 0; k < 3; k++)
|
||||
tick(++tickcount, tb, tfp);
|
||||
|
||||
Reference in New Issue
Block a user