- Apr 14, 2022
-
-
Byron Lathi authored
Read data from a file See merge request !12
-
Byron Lathi authored
Prints out information about the drive, now inside its own function. Also changes the read function to take in a 32 bit address instead of a 16 bit one. Attempts to read the first file on the disk
-
Byron Lathi authored
Adds filesystem info struct and directory entry structs
-
Byron Lathi authored
Prints out all of the parameter blocks for the SD card.
-
Byron Lathi authored
Adds some struct types for the FAT32 file system. This just includes the information in the parameter blocks, not any actual files.
-
Byron Lathi authored
Add a simple function which reads a 512 block from the SD card and then prints it to the console.
-
Byron Lathi authored
The but count should be set to 7 when entering RXDATA. previously it was not reset or left at 0, which caused the first byte to only have the lsb set and all other bits to be read incorrectly.
-
Byron Lathi authored
This was probably an off-by-one mistage, with the width set to 10 instead of 9. The width should be 9 since the buffer is 512 bytes.
-
- Apr 11, 2022
-
-
Byron Lathi authored
Add SD Card Controller See merge request !11
-
Byron Lathi authored
Adds some missing cases, length specifiers.
-
Byron Lathi authored
-
Byron Lathi authored
Adds functions to wait for data to be read, and to read data form the sd card controller.
-
Byron Lathi authored
After a data read (e.g. CMD17) the data received from the SD card is stored into a buffer which can be read back one byte at a time by the CPU through address 5. There is also a flag which is set when data is received. This can be checked by reading the CMD register, which doubles as the status register.
-
Byron Lathi authored
Adds a new memory location for data accesses.
-
Byron Lathi authored
Polls the sd controller until the read flag is set, at which point it reads 32 bits of data from the controller. long response codes (such as CID) are not supported in hw or sw.
-
Byron Lathi authored
Read flag is set when the sd controller reads response data in from the sd card. When the cpu reads from the controller, the flag is reset. This flag does not trigger an interrupt, it mmust be polled.
-
Byron Lathi authored
These series of commands are enough to read the first 512b block off of the sd card. The RCA is hard coded to the sd card that I have on hand, since response codes are not supported
-
- Apr 10, 2022
-
-
Byron Lathi authored
Adds a function to send a command to the sd card.
-
Byron Lathi authored
Also adds the logic required for the bidirectional sd lines and attaches the controller to the cpu.
-
Byron Lathi authored
The SD card expects data to transition on falling edges and be stable on rising edges. Additionally, writes from the CPU were not handled with correct timing. Now, there is an extra state when writing to the command register so that the command is properly latched before the CRC is calculated.
-
Byron Lathi authored
Updates the testbench to simulate writes with more correct timings. Writes take two clock cycles since the cpu runs at half speed.
-
Byron Lathi authored
-
- Apr 09, 2022
-
-
Byron Lathi authored
-
- Apr 08, 2022
-
-
Byron Lathi authored
Sends a few commands which we know the proper checksum for and makes sure that the bits on the output are correct.
-
Byron Lathi authored
Adds the start of the SD card controller which is capable of sending commands using the SD protocol. It is accessed by writing the arguments first and triggered by writing the command number.
-
Byron Lathi authored
Previously the crc would be reset after 1 clock cycle while the valid signal was still high. Now the data is preserved in the valid state until the load signal is asserted.
-
Byron Lathi authored
These are just some values that I found from an example program. This does not test every possible value.
-
Byron Lathi authored
This module takes in a 40 bit word and generates the 7 bit crc7 appropriate for an SD card. It does not use any fancy parallel algorithm, it does it 1 bit at a time.
-
Byron Lathi authored
-
- Apr 07, 2022
-
-
Byron Lathi authored
Add memory mapper. See merge request !10
-
Byron Lathi authored
This code creates a shared mapping in high ram, makes sure that that works, and also makes sure that the memory which is mapped over is left unchanged.
-
Byron Lathi authored
address decoding is now performed on the translated address which comes from the memory mapper, instead of the address coming directly from the cpu. This means that you can access the full amount of ram at any address that it is mapped to.
-
Byron Lathi authored
-
Byron Lathi authored
-
Byron Lathi authored
Upon reset the mapper is set to identity map and then enabled.
-
Byron Lathi authored
Upon reset the memory mapper is automatically disabled, but the mappings are not cleared.
-
Byron Lathi authored
Adds functions to read and write mappings, as well as enable and disable the memory mapper. This also moves increases the io space by 16 bytes.
-
- Apr 05, 2022
-
-
Byron Lathi authored
-
Byron Lathi authored
-
Byron Lathi authored
This testbench simply creates the memory mapper, adds a mapping to the first entry, and then makes sure the addresses are correct after enabling and disabling the memory mapper.
-