Advertisement
Guest User

Untitled

a guest
Dec 27th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Build with the following and no blink.  Omit the -abc9 and blink.
  3.  
  4. %.json: $(SRC) Makefile
  5.     yosys -p "read -sv -DBADGE_VER=$(BADGE_VER) -DBADGE_V$(BADGE_VER)=1 $(SRC);\
  6.               synth_ecp5 -abc9 -top $(PROJTOP) -json $@"
  7. */
  8.  
  9.  
  10. module led_blink (
  11.         input clk,
  12.         output [10:0] ledc
  13.     );
  14.  
  15.     reg [28:0] led_counter = 0;
  16.     always @( posedge clk ) begin
  17.             led_counter <= led_counter + 1;
  18.     end
  19.         assign ledc[ 8 ] = !led_counter[ 23:17 ];
  20.  
  21. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement