Created
          April 2, 2022 01:14 
        
      - 
      
- 
        Save shapr/bdf48dedf3812249bd3d3f01feb7a23c to your computer and use it in GitHub Desktop. 
    verilog blinky
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | module bar ( | |
| clk, | |
| rst, | |
| dout | |
| ); | |
| parameter buswidth = 8; | |
| parameter n = 4; | |
| input clk; | |
| input rst; | |
| output [7:0] dout; // 8 bit register | |
| wire clk; | |
| wire rst; | |
| reg [7:0] dout; | |
| always @ (posedge clk) | |
| begin: COUNTER | |
| if (rst == 1'b1) begin | |
| dout <= #1 8'b00000000; | |
| end | |
| else begin | |
| dout <= #1 dout + 1; | |
| end | |
| end // end of counter end of block COUNTER | |
| endmodule // bar | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment