ereader.v 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. `include "picorv32.v"
  2. module ereader(CLK, BUT1, BUT2, LED1, LED2);
  3. //eink eink(image, clk_eink, DC, CS, DIN, RST, BUSY)
  4. picorv32 core (
  5. .clk (clk),
  6. .resetn (resetn),
  7. .mem_valid (mem_valid),
  8. .mem_addr (mem_addr ),
  9. .mem_wdata (mem_wdata),
  10. .mem_wstrb (mem_wstrb),
  11. .mem_instr (mem_instr),
  12. .mem_ready (mem_ready),
  13. .mem_rdata (mem_rdata)
  14. );
  15. always@(posedge CLK) begin
  16. //manage computation to memory;
  17. end
  18. input BUT1; //input signal from button 1
  19. input BUT2; //input signal from button 2
  20. output LED1; //output signal to LED1
  21. output LED2; //output signal to LED2
  22. //assign LED1 = 1'b0;
  23. //assign LED2 = 1'b0;
  24. wire clk_eink;
  25. reg [5:0] clk_div;
  26. assign clk_eink = clk_div[5]
  27. always @ (posedge CLK) begin
  28. clk_div <= clk_div + 6'b1;
  29. end
  30. always @ (negedge BUT1)
  31. begin
  32. LED1 = 1'b0;
  33. LED2 = 1'b1;
  34. end
  35. always @ (negedge BUT2)
  36. begin
  37. LED1 = 1'b1;
  38. LED2 = 1'b0;
  39. end
  40. endmodule