SHARE
TWEET

Untitled

a guest Mar 24th, 2018 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `ifdef RANDOMIZE_GARBAGE_ASSIGN
  2. `define RANDOMIZE
  3. `endif
  4. `ifdef RANDOMIZE_INVALID_ASSIGN
  5. `define RANDOMIZE
  6. `endif
  7. `ifdef RANDOMIZE_REG_INIT
  8. `define RANDOMIZE
  9. `endif
  10. `ifdef RANDOMIZE_MEM_INIT
  11. `define RANDOMIZE
  12. `endif
  13.  
  14. module LedToggler( // @[:@3.2]
  15.   input   clock, // @[:@4.4]
  16.   input   reset, // @[:@5.4]
  17.   input   io_nreset, // @[:@6.4]
  18.   output  io_output // @[:@6.4]
  19. );
  20.   reg [31:0] _T_8; // @[LedToggler.scala 20:24:@9.4]
  21.   reg [31:0] _RAND_0;
  22.   reg  _T_11; // @[LedToggler.scala 21:24:@10.4]
  23.   reg [31:0] _RAND_1;
  24.   wire  _T_5; // @[LedToggler.scala 19:13:@8.4]
  25.   wire  _T_13; // @[LedToggler.scala 23:13:@11.4]
  26.   wire  _T_16; // @[LedToggler.scala 25:16:@14.6]
  27.   wire [32:0] _T_18; // @[LedToggler.scala 27:14:@18.6]
  28.   wire [32:0] _T_19; // @[LedToggler.scala 27:14:@19.6]
  29.   wire [31:0] _T_20; // @[LedToggler.scala 27:14:@20.6]
  30.   wire [31:0] _GEN_0; // @[LedToggler.scala 23:22:@12.4]
  31.   wire  _GEN_1; // @[LedToggler.scala 23:22:@12.4]
  32.   assign _T_5 = io_nreset == 1'h0; // @[LedToggler.scala 19:13:@8.4]
  33.   assign _T_13 = _T_8 == 32'h0; // @[LedToggler.scala 23:13:@11.4]
  34.   assign _T_16 = _T_11 == 1'h0; // @[LedToggler.scala 25:16:@14.6]
  35.   assign _T_18 = _T_8 - 32'h1; // @[LedToggler.scala 27:14:@18.6]
  36.   assign _T_19 = $unsigned(_T_18); // @[LedToggler.scala 27:14:@19.6]
  37.   assign _T_20 = _T_19[31:0]; // @[LedToggler.scala 27:14:@20.6]
  38.   assign _GEN_0 = _T_13 ? 32'h17d7840 : _T_20; // @[LedToggler.scala 23:22:@12.4]
  39.   assign _GEN_1 = _T_13 ? _T_16 : _T_11; // @[LedToggler.scala 23:22:@12.4]
  40.   assign io_output = _T_11;
  41. `ifdef RANDOMIZE
  42.   integer initvar;
  43.   initial begin
  44.     `ifndef verilator
  45.       #0.002 begin end
  46.     `endif
  47.   `ifdef RANDOMIZE_REG_INIT
  48.   _RAND_0 = {1{$random}};
  49.   _T_8 = _RAND_0[31:0];
  50.   `endif // RANDOMIZE_REG_INIT
  51.   `ifdef RANDOMIZE_REG_INIT
  52.   _RAND_1 = {1{$random}};
  53.   _T_11 = _RAND_1[0:0];
  54.   `endif // RANDOMIZE_REG_INIT
  55.   end
  56. `endif // RANDOMIZE
  57.   always @(posedge clock) begin
  58.     if (_T_5) begin
  59.       _T_8 <= 32'h0;
  60.     end else begin
  61.       if (_T_13) begin
  62.         _T_8 <= 32'h17d7840;
  63.       end else begin
  64.         _T_8 <= _T_20;
  65.       end
  66.     end
  67.     if (_T_5) begin
  68.       _T_11 <= 1'h1;
  69.     end else begin
  70.       if (_T_13) begin
  71.         _T_11 <= _T_16;
  72.       end
  73.     end
  74.   end
  75. endmodule
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top