working stop watch

This commit is contained in:
2020-10-26 17:35:52 -05:00
parent 4886fad4b2
commit a0b211338c
4 changed files with 47 additions and 39 deletions

View File

@@ -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);