FPGC6.v 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Top level design of the FPGC6
  3. */
  4. module FPGC6(
  5. input clk, // 100MHz
  6. input nreset,
  7. //Led for debugging
  8. output led
  9. );
  10. //--------------------Reset&Stabilizers-----------------------
  11. //Reset signals
  12. wire nreset_stable, reset;
  13. MultiStabilizer multistabilizer (
  14. .clk(clk),
  15. .u0(nreset),
  16. .s0(nreset_stable)
  17. );
  18. assign reset = ~nreset_stable;
  19. // Bus
  20. wire [26:0] bus_addr;
  21. wire [31:0] bus_data;
  22. wire bus_we;
  23. wire bus_start;
  24. wire [31:0] bus_q;
  25. wire bus_done;
  26. MemoryUnit memoryunit(
  27. // Clocks
  28. .clk (clk),
  29. .reset (reset),
  30. // Bus
  31. .bus_addr (bus_addr),
  32. .bus_data (bus_data),
  33. .bus_we (bus_we),
  34. .bus_start (bus_start),
  35. .bus_q (bus_q),
  36. .bus_done (bus_done)
  37. );
  38. //---------------CPU----------------
  39. CPU cpu(
  40. .clk (clk),
  41. .reset (reset),
  42. // bus
  43. .bus_addr (bus_addr),
  44. .bus_data (bus_data),
  45. .bus_we (bus_we),
  46. .bus_start (bus_start),
  47. .bus_q (bus_q),
  48. .bus_done (bus_done),
  49. .led (led)
  50. );
  51. endmodule