SummerCart64/fw/rtl/cpu/cpu_soc.sv

82 lines
1.6 KiB
Systemverilog
Raw Normal View History

2021-08-12 21:07:47 +02:00
module cpu_soc (
2021-08-18 13:54:07 +02:00
if_system.sys sys,
2021-08-20 19:51:55 +02:00
if_config cfg,
2021-08-21 04:35:40 +02:00
if_dma dma,
2021-08-05 19:50:29 +02:00
2021-08-12 21:07:47 +02:00
input [7:0] gpio_i,
output [7:0] gpio_o,
output [7:0] gpio_oe,
2021-08-05 19:50:29 +02:00
2021-08-20 19:51:55 +02:00
output i2c_scl,
2021-08-18 13:54:07 +02:00
inout i2c_sda,
2021-08-12 21:07:47 +02:00
output usb_clk,
output usb_cs,
input usb_miso,
inout [3:0] usb_miosi,
2021-08-18 13:54:07 +02:00
input usb_pwren,
2021-08-05 19:50:29 +02:00
2021-08-18 13:54:07 +02:00
input uart_rxd,
output uart_txd,
input uart_cts,
2021-08-20 19:51:55 +02:00
output uart_rts,
2021-08-05 19:50:29 +02:00
2021-08-20 19:51:55 +02:00
output sd_clk,
inout sd_cmd,
inout [3:0] sd_dat
);
2021-08-15 21:49:02 +02:00
2021-08-20 19:51:55 +02:00
if_cpu_bus bus ();
2021-08-05 19:50:29 +02:00
2021-08-20 19:51:55 +02:00
cpu_wrapper cpu_wrapper_inst (
.sys(sys),
2021-08-15 21:49:02 +02:00
.bus(bus)
);
2021-08-05 19:50:29 +02:00
2021-08-15 21:49:02 +02:00
cpu_ram cpu_ram_inst (
2021-08-20 19:51:55 +02:00
.sys(sys),
.bus(bus.at[sc64::ID_CPU_RAM].device)
2021-08-15 21:49:02 +02:00
);
2021-08-05 19:50:29 +02:00
2021-08-15 21:49:02 +02:00
cpu_bootloader cpu_bootloader_inst (
2021-08-20 19:51:55 +02:00
.sys(sys),
.bus(bus.at[sc64::ID_CPU_BOOTLOADER].device)
2021-08-15 21:49:02 +02:00
);
2021-08-05 19:50:29 +02:00
2021-08-12 21:07:47 +02:00
cpu_gpio cpu_gpio_inst (
2021-08-20 19:51:55 +02:00
.sys(sys),
.bus(bus.at[sc64::ID_CPU_GPIO].device),
2021-08-12 21:07:47 +02:00
.gpio_i(gpio_i),
.gpio_o(gpio_o),
.gpio_oe(gpio_oe)
);
cpu_i2c cpu_i2c_inst (
2021-08-20 19:51:55 +02:00
.sys(sys),
.bus(bus.at[sc64::ID_CPU_I2C].device),
2021-08-15 21:49:02 +02:00
.i2c_scl(i2c_scl),
.i2c_sda(i2c_sda)
2021-08-12 21:07:47 +02:00
);
cpu_usb cpu_usb_inst (
2021-08-18 13:54:07 +02:00
.sys(sys),
2021-08-20 19:51:55 +02:00
.bus(bus.at[sc64::ID_CPU_USB].device),
2021-08-21 02:53:28 +02:00
.dma(dma),
2021-08-12 21:07:47 +02:00
.usb_clk(usb_clk),
.usb_cs(usb_cs),
.usb_miso(usb_miso),
2021-08-16 00:23:10 +02:00
.usb_miosi(usb_miosi),
2021-08-18 13:54:07 +02:00
.usb_pwren(usb_pwren)
);
2021-08-20 19:51:55 +02:00
cpu_uart cpu_uart_inst (
.sys(sys),
.bus(bus.at[sc64::ID_CPU_UART].device),
2021-08-18 13:54:07 +02:00
.uart_rxd(uart_rxd),
.uart_txd(uart_txd),
.uart_cts(uart_cts),
.uart_rts(uart_rts)
2021-08-12 21:07:47 +02:00
);
2021-08-05 19:50:29 +02:00
endmodule