Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop action #91

Merged
merged 9 commits into from
May 7, 2019
Merged

Loop action #91

merged 9 commits into from
May 7, 2019

Conversation

leonardt
Copy link
Owner

@leonardt leonardt commented May 6, 2019

Initial implementation of loop action for TBG, only tested on verilator.

Here's the generated main for test_tester_loop

 int main(int argc, char **argv) {
  Verilated::commandArgs(argc, argv);
  VArrayCircuit* top = new VArrayCircuit;

#if VM_TRACE
  Verilated::traceEverOn(true);
  tracer = new VerilatedVcdC;
  top->trace(tracer, 99);
  mkdir("logs", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
  tracer->open("logs/ArrayCircuit.vcd");
#endif

  top->I = 0;
  for (int __fault_loop_var_action_0 = 0; __fault_loop_var_action_0 < 7; __fault_loop_var_action_0++) {
      top->I = __fault_loop_var_action_0;
      top->eval();
      main_time++;
      #if VM_TRACE
      tracer->dump(main_time);
      #endif
      my_assert(top->O, __fault_loop_var_action_0, 1, "ArrayCircuit.O");
  }


#if VM_TRACE
  tracer->close();
#endif
}

@leonardt leonardt requested a review from rsetaluri May 6, 2019 20:47
@coveralls
Copy link

coveralls commented May 6, 2019

Pull Request Test Coverage Report for Build 794

  • 42 of 56 (75.0%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 77.29%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fault/verilog_target.py 3 4 75.0%
fault/actions.py 10 12 83.33%
fault/cosa_target.py 1 5 20.0%
fault/system_verilog_target.py 1 8 12.5%
Files with Coverage Reduction New Missed Lines %
fault/verilog_target.py 1 88.1%
Totals Coverage Status
Change from base Build 770: -0.07%
Covered Lines: 1249
Relevant Lines: 1616

💛 - Coveralls

Copy link
Collaborator

@rsetaluri rsetaluri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice design. Few small comments

fault/tester.py Outdated

def loop(self, n_iter):
"""
Returns a new tester with a special
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hanging comment

@leonardt leonardt merged commit afa9dd5 into master May 7, 2019
@leonardt leonardt deleted the loop-action branch May 7, 2019 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants