Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. x.lpf:
  2. BLOCK RESETPATHS ;
  3. BLOCK ASYNCPATHS ;
  4. SYSCONFIG TRANSFR=ON ;
  5. LOCATE COMP "mumus" SITE "C6" ;
  6. LOCATE COMP "led" SITE "P2" ;
  7. LOCATE COMP "clk" SITE "B12" ;
  8. LOCATE COMP "coco" SITE "L1" ;
  9.  
  10.  
  11. x.v:
  12. module top(input clk, output led, output coco,output mumus);
  13.  
  14. reg ctr = 0;
  15. reg[24:0] counter = 0;
  16. always@(posedge clk) begin
  17. if (ctr == 1) begin
  18. ctr <= 0;
  19. counter <= counter + 1;
  20. end
  21. else
  22. ctr <= 1;
  23. end
  24.  
  25. assign led = ctr;
  26. assign coco = led;
  27. assign mumus = counter;
  28. endmodule
  29.  
  30. commands on linux (don't forget to replace the path to database):
  31. yosys -p "synth_ecp5 -json x.json" x.v
  32. nextpnr-ecp5 --json x.json --textcfg x_out.config --um5g-25k --package CABGA381 --lpf x.lpf
  33. ecppack --db /path/to/database --svf x.svf x_out.config x.bit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement