Advertisement
Guest User

Untitled

a guest
Mar 25th, 2022
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Generator : SpinalHDL v1.6.4    git head : 598c18959149eb18e5eee5b0aa3eef01ecaa41a1
  2. // Component : Playground
  3. // Git hash  : 29349219b196ff75f1ad04e2876db9c95bc17b55
  4.  
  5. `timescale 1ns/1ps
  6.  
  7. module Playground (
  8.   input               clk_26,
  9.   input               gba_but_l,
  10.   output              backlight
  11. );
  12.  
  13.   wire                pll_PLLOUTGLOBAL;
  14.   wire                pll_LOCK;
  15.   wire                bufferCC_1_io_dataOut;
  16.   wire                core_clk;
  17.   wire                core_reset;
  18.   wire                _zz_1;
  19.   reg                 gba_but_l_regNext;
  20.  
  21.   SB_PLL40_CORE #(
  22.     .FEEDBACK_PATH("SIMPLE"),
  23.     .PLLOUT_SELECT("GENCLK"),
  24.     .DIVR(1),
  25.     .DIVF(76),
  26.     .DIVQ(5),
  27.     .FILTER_RANGE(1)
  28.   ) pll (
  29.     .REFERENCECLK    (clk_26            ), //i
  30.     .PLLOUTGLOBAL    (pll_PLLOUTGLOBAL  ), //o
  31.     .LOCK            (pll_LOCK          ), //o
  32.     .RESETB          (1'b1              )  //i
  33.   );
  34.   BufferCC bufferCC_1 (
  35.     .io_dataIn     (1'b0                   ), //i
  36.     .io_dataOut    (bufferCC_1_io_dataOut  ), //o
  37.     .core_clk      (core_clk               ), //i
  38.     ._zz_1         (_zz_1                  )  //i
  39.   );
  40.   assign core_clk = pll_PLLOUTGLOBAL;
  41.   assign _zz_1 = (! pll_LOCK);
  42.   assign core_reset = bufferCC_1_io_dataOut;
  43.   assign backlight = gba_but_l_regNext;
  44.   always @(posedge core_clk) begin
  45.     gba_but_l_regNext <= gba_but_l;
  46.   end
  47.  
  48.  
  49. endmodule
  50.  
  51. module BufferCC (
  52.   input               io_dataIn,
  53.   output              io_dataOut,
  54.   input               core_clk,
  55.   input               _zz_1
  56. );
  57.  
  58.   (* async_reg = "true" *) reg                 buffers_0;
  59.   (* async_reg = "true" *) reg                 buffers_1;
  60.  
  61.   assign io_dataOut = buffers_1;
  62.   always @(posedge core_clk or posedge _zz_1) begin
  63.     if(_zz_1) begin
  64.       buffers_0 <= 1'b1;
  65.       buffers_1 <= 1'b1;
  66.     end else begin
  67.       buffers_0 <= io_dataIn;
  68.       buffers_1 <= buffers_0;
  69.     end
  70.   end
  71.  
  72.  
  73. endmodule
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement