Skip to content

Commit

Permalink
Add/update SD card related testbenchs
Browse files Browse the repository at this point in the history
  • Loading branch information
harbaum committed Dec 18, 2023
1 parent 66a463d commit a17fae8
Show file tree
Hide file tree
Showing 10 changed files with 1,507 additions and 792 deletions.
13 changes: 13 additions & 0 deletions sim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ card are probably sufficient:
$ dd if=/dev/sdb of=sd16g.img bs=1024 count=10240
```

## sdc_tb

The [SD card testbench](sdc_tb) is a low level testbench that was
created to implement a 4 bit SD card driver with read and write
capabilities. It is based in the
[FPGA-SDcard-Reader](https://github.com/WangXuan95/FPGA-SDcard-Reader)
project. This testbench includes a verilator/c++ implementation of an
SD card.

This testbench comes with an [Arduino sketch](sdc_tb/sdtest) that was
used on a ESP8266 to test and learn about the 4 bit SD card mode with
a real SD card connected to the ESP8266 microcontroller.

## flash_tb

[Flash_tb](flash_tb) simulates interfacing to the SPI flash of the Tang Nano
Expand Down
2 changes: 1 addition & 1 deletion sim/floppy_tb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OBJ_DIR=obj_dir
VERILATOR_DIR=/usr/local/share/verilator/include
VERILATOR_FILES=verilated.cpp verilated_vcd_c.cpp verilated_threads.cpp

HDL_FILES = floppy_tb.v sd_fake.v ../../src/misc/sd_card.v ../../src/misc/sdcmd_ctrl.v ../../src/misc/sd_reader.v ../../src/fdc1772/fdc1772.v ../../src/fdc1772/floppy.v
HDL_FILES = floppy_tb.v ../../src/misc/sd_card.v ../../src/misc/sdcmd_ctrl.v ../../src/misc/sd_rw.v ../../src/fdc1772/fdc1772.v ../../src/fdc1772/floppy.v

FATFS=../../../../firmware/bouffalo_sdk/components/fs/fatfs

Expand Down
Loading

0 comments on commit a17fae8

Please sign in to comment.