aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 65700601941fba2277c134820529eb7f4c5864dd (plain) (blame)
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
34
35
36
37
38
39
40
41
42
43
44
45
# Verilog SPI

Verilog SPI master and slave that supports all modes and variable width
via parameters.

## License

All code in this project is licensed to the terms of the Mozilla Public
License, v.2.0. A copy of this license may be found in the file `COPYING`. You
can obtain one at https://mozilla.org/MPL/2.0/.

All Verilog source in this project is dual-licensed under the MPL v2.0
and the CERN-OHL-W v2.0 (or any later version).

## Tests

Run `./mk.sh` in `tests/` to generate and run tests.

## Modules

"master_no_read" and "slave_no_write" have no Master In, Slave Out ("miso")
wires (and no corresponding shift registers), while "master_no_write"
and "slave_no_read" have no Master Out, Slave In ("mosi") wires. This
is for compatability for "SPI compatible" devices that are read only.

"master_ss" and others include a timer that will assert the Slave Select
pin and wait a set number of clock cycles before starting the SPI transfer.

## SPI Modes

Modes are denoted by `modePH`, where `P` is the polarity (0 for normal,
1 for inverted) and `H` for phase:

* `H = 0` means the device reads on a rising edge and writes on a falling
  edge.
* `H = 1` means the device reads on a falling edge and writes on a rising
  edge.

Although these modules support all SPI modes, they are labeled slightly
differently from other SPI modes. The phase factor is denoted in terms
of falling and rising edges, not in terms of leading and trailing edges.
This means that polarity also flips the phase term, so a mode 3 device
is a mode 10 device. Devices with regular clock polarity are unaffected,
so a mode 0 device is a mode 00 device, and a mode 1 device is a mode
01 device.
p;id=e753a09b3831ab3f4f1d320d8ec18d4a0c4a0229&follow=1'>Updates for new rawiso ioctl interface.Gravatar bencollins 3-37/+125 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@103 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-15add iso_xmit_sync() and iso_xmit_write(); clean up iso handling a bitGravatar dmaas 5-39/+161 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@102 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-15implement tag matching for rawiso receptionGravatar dmaas 3-4/+12 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@101 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-06back out previous commit - don't drop the legacy API just yetGravatar dmaas 6-173/+130 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@100 53a565d1-3bb7-0310-b661-cf11e63c67ab 2003-01-05emulate legacy ISO reception API on top of new rawiso APIGravatar dmaas 7-131/+174 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@99 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-24update iso API for multi-channel reception and new packet buffer layoutGravatar dmaas 4-123/+236 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@98 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-20oops, irq_interval needs to be signedGravatar anonymous 1-1/+1 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@97 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-20dmaas - renamed exported arm definitions into the raw1394_ namespace; ↵Gravatar anonymous 3-124/+48 brought kernel-raw1394.h back in sync with the kernel version git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@96 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-12-16rawiso updates:Gravatar dmaas 3-18/+25 - changed return type of rawiso xmit/recv handlers from int to enum raw1394_iso_disposition - added an ioctl (RAW1394_ISO_QUEUE_ACTIVITY) to force an ISO_ACTIVITY event into the queue. This is needed for handling RAW1394_ISO_DEFER, to kick us out of the next read() instead of sleeping forever. - removed references to "8-byte" isochronous header - this is an OHCI-specific implementation detail git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@95 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-11-18fix cplusplus extern C blockGravatar ddennedy 1-4/+4 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@94 53a565d1-3bb7-0310-b661-cf11e63c67ab 2002-11-18merged rawiso branchGravatar ddennedy 7-6/+488 git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@93 53a565d1-3bb7-0310-b661-cf11e63c67ab