aboutsummaryrefslogtreecommitdiff
path: root/include/macroasm.vh
blob: 0c63ea7708210ef10b6d8fd78dfbfd44f932b8bc (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
`define C(comment) // make comments that disapper after preprocessing

`C((
This file implements a kind of macro assembly to generate instructions for our
wishbone master mock module. The instructions specify what commands the master
should send to its wishbone interface and what intervals it should put in
between. $readmemh() is used to "load" the preprocessed instructions into
the simulation.

This header should be `included in the file with macroassembly operations.

To generate the actual memory file you can for example use the -E flag to
IVerilog, like this:
$ iverilog -E some_operations.memv -o some_operations.mem

I should have probably used some other tool for this job... POSIX shell, maybe?

operations:
  0 - read
  1 - write
  2 - wait (CYC_O high and STB_O low for one tick)
  3 - deselect (CYC_O low for one tick)
))

`define READ(addr, expected_data) 0``addr``expected_data
`define WRITE(addr, data)         1``addr``data
`define WAIT                      2xxxxxxxxx
`define DESELECT                  3xxxxxxxxx

`C((
We have to take care to use the correct number of digits for addresses and
datas - the macros don't validate their arguments!
))
class='msg-avail'>...Florian Pelz 2020-04-19installer: Add GC root for Guile 3.0....Marius Bakke 2020-04-15Merge branch 'master' into core-updatesMarius Bakke 2020-04-14installer: Only load uvesafb kernel module when needed....Florian Pelz 2020-04-11installer: Load uvesafb kernel module....Florian Pelz 2020-02-11system: Stop using canonical-package....Mathieu Othacehe 2020-01-03install: Add jfsutils to the installation image....Tobias Geerinckx-Rice 2019-12-01install: Pass 'local-file' literal strings for proper resolution....Ludovic Courtès 2019-10-18gnu: Add u-boot-firefly-rk3399....Vagrant Cascadian 2019-10-18gnu: Add u-boot-rock64-rk3328....Vagrant Cascadian 2019-10-18gnu: Add u-boot-rockpro64-rk3399...Caliph Nomble 2019-06-29etc: Remove hydra.gnu.org.pub key....Tobias Geerinckx-Rice 2019-05-13install: Add node name in Russian....Ludovic Courtès 2019-04-25install: Add node name in Castellano....Ludovic Courtès 2019-04-23install: Pass "quiet" to the kernel....Ludovic Courtès 2019-04-21install: Pass "modprobe.blacklist=radeon"....Ludovic Courtès 2019-04-15install: Provide a meaningful label....Ludovic Courtès 2019-04-12install: Use a font with more glyphs on tty2....Ludovic Courtès 2019-04-12installer: Choosing a locale opens the translated manual on tty2....Ludovic Courtès 2019-04-12install: Add standalone documentation service....Ludovic Courtès 2019-04-07install: Tweak motd....Ludovic Courtès 2019-04-07install: Remove "GuixSD"....Ludovic Courtès 2019-03-25accounts: Add default value for the 'home-directory' field of <user-account>....Ludovic Courtès 2019-03-13Remove traces of "GuixSD"....Ludovic Courtès