-rw-r--r-- | 65 | .gitignore | blob | history | raw |
-rw-r--r-- | 703 | Makefile | blob | history | raw |
-rw-r--r-- | 2555 | README.md | blob | history | raw |
-rw-r--r-- | 2127 | README_old.md | blob | history | raw |
-rw-r--r-- | 460 | bitbucket-pipelines.yml | blob | history | raw |
drwxr-xr-x | - | docs | tree | history |
drwxr-xr-x | - | figure | tree | history |
drwxr-xr-x | - | src | tree | history |
drwxr-xr-x | - | test | tree | history |
Existing pinmux.bsv for testing purpose:
cd src/test_bsv
make
Pinmux generator help:
python src/pinmux_generator.py -h
To create a microtest directory and bsv files:
python src/pinmux_generator.py -v -o microtest -s microtest
python src/pinmux_generator.py -v -o microtest
To create a minitest directory and bsv files:
python src/pinmux_generator.py -v -o minitest -s minitest
python src/pinmux_generator.py -v -o minitest
Existing specifications in 'src/spec/' : m_class, i_class, c_class, microtest, minitest
Testing pinmux using cocotb: ``` cd src/test_bsv/tests
1 . Let's say that the pinmap which we wish to implement is :
The default order for UART and SPI with pinmux repository is :
* UART : tx -> rx
* MSPI: ck -> nss -> io0 -> io1
After generating minitest, this order can be observed in uart.txt, mspi.txt, etc.
2 . We will rearrange the order of pins of our pinmap to confine to default order :
After reordering, it will look like:
How to specify this table to generate pinmux.bsv? In pinmux repository, we write the specifications in 'src/spec' directory, like default minitest.py. For this case, we will simply modify original minitest.py to suit our table.
2) ps.mspi("2", ('A', 7), 1) There are 4 arguments passed. 1st argument specifies the id of MSPI. 2nd argument specifies the bank and pin number. 3rd argument specifies the mux selection line. Here this will reflect as: pin number mux1 7 A MSPI2 CK 8 A MSPI2 NSS 9 A MSPI2 IO0 10 A MSPI2 IO1
3) ps.uart(" 3 ", ( 'A', 2 ) , 1 ) Here, argument meaning is same as (2)
4) ps.pwm("" , ('A', 10) , 2 , 5 , 1 ) Here, argument meaning is same as (1)
The complete python file for this table is : src/spec/minitest.py . Original minitest: src/spec/minitest_old.py