diff --git a/cMIPS/tests/uart_irx.c b/cMIPS/tests/uart_irx.c index d783b6ecca398a95433efb09b2291c324ca4321f..9c837c498a0e9b4675846d9932be6e00eb1e13e8 100644 --- a/cMIPS/tests/uart_irx.c +++ b/cMIPS/tests/uart_irx.c @@ -1,16 +1,15 @@ #include "cMIPS.h" typedef struct control { // control register fields (uses only ls byte) - int ign : 24+3, // ignore uppermost bits + int ign : 24, // ignore uppermost bits + rts : 1, // Request to Send output (bit 7) + ign2 : 2, // bits 6,5 ignored intTX : 1, // interrupt on TX buffer empty (bit 4) intRX : 1, // interrupt on RX buffer full (bit 3) speed : 3; // 4,8,16..256 tx-rx clock data rates (bits 0..2) } Tcontrol; typedef struct status { // status register fields (uses only ls byte) -#if 1 - int s; -#else int ign : 24, // ignore uppermost bits ign7 : 1, // ignored (bit 7) txEmpty : 1, // TX register is empty (bit 6) @@ -20,7 +19,6 @@ typedef struct status { // status register fields (uses only ls byte) ign2 : 1, // ignored (bit 2) framing : 1, // framing error (bit 1) overun : 1; // overun error (bit 0) -#endif } Tstatus; #define RXfull 0x00000020 @@ -55,6 +53,7 @@ int main(void) { // receive a string through the UART serial interface uart = (void *)IO_UART_ADDR; // bottom of UART address range ctrl.ign = 0; + ctrl.rts = 0; ctrl.intTX = 0; ctrl.intRX = 1; ctrl.speed = 1; // operate at 1/2 of the highest data rate diff --git a/cMIPS/vhdl/packageMemory.vhd b/cMIPS/vhdl/packageMemory.vhd index f5e0a9fb7ffc2d0ca848f272170908c2f6a15c3b..4a3341ccd280d12b643f785053f1408a65ccf89c 100644 --- a/cMIPS/vhdl/packageMemory.vhd +++ b/cMIPS/vhdl/packageMemory.vhd @@ -41,9 +41,9 @@ package p_MEMORY is -- begin DO NOT change these names as several scripts depend on them -- -- you may change the values, not names neither formatting -- constant x_INST_BASE_ADDR : reg32 := x"00000000"; - constant x_INST_MEM_SZ : reg32 := x"00002000"; + constant x_INST_MEM_SZ : reg32 := x"00004000"; constant x_DATA_BASE_ADDR : reg32 := x"00010000"; - constant x_DATA_MEM_SZ : reg32 := x"00002000"; + constant x_DATA_MEM_SZ : reg32 := x"00008000"; constant x_IO_BASE_ADDR : reg32 := x"0F000000"; constant x_IO_MEM_SZ : reg32 := x"00002000"; constant x_IO_ADDR_RANGE : reg32 := x"00000020";