aboutsummaryrefslogtreecommitdiffstats
path: root/examples/cmos/counter.v
blob: f21658724f641e05fb5b0a3c0e7845da9044a3e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module counter (clk, rst, en, count);

   input clk, rst, en;
   output reg [2:0] count;

   always @(posedge clk)
      if (rst)
         count <= 3'd0;
      else if (en)
         count <= count + 3'd1;

endmodule
an> def __init__(self): self.has_errored = False def log(self, e): if e.level == "error": self.has_errored = True class DumpMaster(master.Master): def __init__( self, options: options.Options, server, with_termlog=True, with_dumper=True, ) -> None: master.Master.__init__(self, options, server) self.errorcheck = ErrorCheck() if with_termlog: self.addons.add(termlog.TermLog(), termstatus.TermStatus()) self.addons.add(*addons.default_addons()) if with_dumper: self.addons.add(dumper.Dumper()) self.addons.add( keepserving.KeepServing(), readfile.ReadFileStdin(), self.errorcheck )