Skip to content

Commit

Permalink
MMC rewiring, by @kitune-san
Browse files Browse the repository at this point in the history
  • Loading branch information
spark2k06 committed Feb 28, 2023
1 parent cf17b65 commit 542dbf0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions HW/system_2MB.v
Expand Up @@ -24,10 +24,10 @@ module system_2MB(

output wire AUD_L,
output wire AUD_R,
output reg SD_n_CS = 1,
output wire SD_DI,
output wire SD_CK,
input wire SD_DO
output reg SD_n_CS = 1'bz,
inout wire SD_DI, // CMD
output wire SD_CK, // CLK
inout wire SD_DO // DAT0
/*
output wire LED,
inout wire PS2_CLK1,
Expand Down Expand Up @@ -377,8 +377,8 @@ reg splash_status = 1'b0;
assign SD_DI = (~mmc_cmd_io & ~mmc_cmd_out) ? 1'b0 : 1'bz;
assign mmc_cmd_in = SD_DI;

assign mmc_dat_in = (~mmc_dat_io & ~mmc_dat_out) ? 1'b0 : 1'bz;
assign SD_DO = mmc_dat_in;
assign SD_DO = (~mmc_dat_io & ~mmc_dat_out) ? 1'b0 : 1'bz;
assign mmc_dat_in = SD_DO;

//
/////////////////////// CPU ///////////////////////
Expand Down
8 changes: 4 additions & 4 deletions HW/unoxt/unoxt_pins.ucf
Expand Up @@ -85,10 +85,10 @@ NET 'ps2_data_io' LOC='F3' |IOSTANDARD = LVCMOS33 |PULLUP |DRIVE = 24;
NET 'ps2_pin6_io' LOC='A2' |IOSTANDARD = LVCMOS33 |PULLUP |DRIVE = 24;
NET 'ps2_pin2_io' LOC='F4' |IOSTANDARD = LVCMOS33 |PULLUP |DRIVE = 24;

NET 'sd_cs0_n_o' LOC='E16' |IOSTANDARD = LVTTL;
NET 'sd_sclk_o' LOC='F16' |IOSTANDARD = LVTTL;
NET 'sd_mosi_o' LOC='F15' |IOSTANDARD = LVTTL;
NET 'sd_miso_i' LOC='G14' |IOSTANDARD = LVTTL |PULLUP;
NET 'sd_cs0_n' LOC='E16' |IOSTANDARD = LVTTL |PULLUP;
NET 'sd_sclk' LOC='F16' |IOSTANDARD = LVTTL;
NET 'sd_mosi' LOC='F15' |IOSTANDARD = LVTTL |PULLUP;
NET 'sd_miso' LOC='G14' |IOSTANDARD = LVTTL |PULLUP;

NET 'flash_cs_n_o' LOC='T3' |IOSTANDARD = LVCMOS33;
NET 'flash_sclk_o' LOC='R11' |IOSTANDARD = LVCMOS33;
Expand Down
16 changes: 8 additions & 8 deletions HW/unoxt/unoxt_top.v
Expand Up @@ -74,10 +74,10 @@
input wire btn_divmmc_n_i,
input wire btn_multiface_n_i,

output wire sd_cs0_n_o,
output wire sd_sclk_o,
output wire sd_mosi_o,
input wire sd_miso_i,
output wire sd_cs0_n,
output wire sd_sclk, // CLK
inout wire sd_mosi, // CMD
inout wire sd_miso, // DAT0

output wire led_red_o,
output wire led_yellow_o,
Expand Down Expand Up @@ -145,10 +145,10 @@
// .PS2_DATA1(PS2DATA),
// .PS2_DATA2(PS2DATB)

.SD_n_CS(sd_cs0_n_o),
.SD_DI(sd_mosi_o),
.SD_CK(sd_sclk_o),
.SD_DO(sd_miso_i)
.SD_n_CS(sd_cs0_n),
.SD_DI(sd_mosi),
.SD_CK(sd_sclk),
.SD_DO(sd_miso)

// .joy_up(P_U),
// .joy_down(P_D),
Expand Down
Binary file modified flash/core05_pcxt.zxt
Binary file not shown.

0 comments on commit 542dbf0

Please sign in to comment.