minic_wb_slave
Mini NIC for WhiteRabbit
Simple, embedded WhiteRabbit-compiliant Network Interface Controller (NIC) for use in WhiteRabbit embedded receivers
Contents:
1. Memory map summary
2. HDL symbol
3. Register description
3.1. miNIC Control Register
3.2. TX DMA Address
3.3. RX DMA Address
3.4. RX buffer size register
3.5. RX buffer available words register
3.6. TX timestamp register 0
3.7. TX timestamp register 1
3.8. Debug register
3.9. Memory protection reg
3.10. Interrupt disable register
3.11. Interrupt enable register
3.12. Interrupt mask register
3.13. Interrupt status register
5. Interrupts
5.1. TX DMA interrupt
5.2. RX DMA interrupt
5.3. TX timestamp available
→
|
rst_n_i
|
|
miNIC Control Register:
|
|
→
|
clk_sys_i
|
|
minic_mcr_tx_start_o
|
→
|
⇒
|
wb_adr_i[4:0]
|
|
minic_mcr_tx_idle_i
|
←
|
⇒
|
wb_dat_i[31:0]
|
|
minic_mcr_tx_error_i
|
←
|
⇐
|
wb_dat_o[31:0]
|
|
minic_mcr_rx_ready_i
|
←
|
→
|
wb_cyc_i
|
|
minic_mcr_rx_full_i
|
←
|
⇒
|
wb_sel_i[3:0]
|
|
minic_mcr_rx_en_o
|
→
|
→
|
wb_stb_i
|
|
minic_mcr_rx_class_o[7:0]
|
⇒
|
→
|
wb_we_i
|
|
|
|
←
|
wb_ack_o
|
|
TX DMA Address:
|
|
←
|
wb_stall_o
|
|
minic_tx_addr_o[23:0]
|
⇒
|
←
|
wb_int_o
|
|
minic_tx_addr_i[23:0]
|
⇐
|
|
|
|
minic_tx_addr_load_o
|
→
|
|
|
|
|
|
|
|
|
RX DMA Address:
|
|
|
|
|
minic_rx_addr_o[23:0]
|
⇒
|
|
|
|
minic_rx_addr_i[23:0]
|
⇐
|
|
|
|
minic_rx_addr_load_o
|
→
|
|
|
|
|
|
|
|
|
RX buffer size register:
|
|
|
|
|
minic_rx_size_o[23:0]
|
⇒
|
|
|
|
minic_rx_size_i[23:0]
|
⇐
|
|
|
|
minic_rx_size_load_o
|
→
|
|
|
|
|
|
|
|
|
RX buffer available words register:
|
|
|
|
|
minic_rx_avail_o[23:0]
|
⇒
|
|
|
|
minic_rx_avail_i[23:0]
|
⇐
|
|
|
|
minic_rx_avail_load_o
|
→
|
|
|
|
|
|
|
|
|
TX timestamp register 0:
|
|
|
|
|
minic_tsr0_valid_i
|
←
|
|
|
|
minic_tsr0_pid_i[4:0]
|
⇐
|
|
|
|
minic_tsr0_fid_i[15:0]
|
⇐
|
|
|
|
|
|
|
|
|
TX timestamp register 1:
|
|
|
|
|
minic_tsr1_tsval_i[31:0]
|
⇐
|
|
|
|
tx_ts_read_ack_o
|
→
|
|
|
|
|
|
|
|
|
Debug register:
|
|
|
|
|
minic_dbgr_irq_cnt_i[23:0]
|
⇐
|
|
|
|
minic_dbgr_wb_irq_val_i
|
←
|
|
|
|
|
|
|
|
|
Memory protection reg:
|
|
|
|
|
minic_mprot_lo_o[15:0]
|
⇒
|
|
|
|
minic_mprot_hi_o[15:0]
|
⇒
|
|
|
|
|
|
|
|
|
TX DMA interrupt:
|
|
|
|
|
irq_tx_i
|
←
|
|
|
|
irq_tx_ack_o
|
→
|
|
|
|
irq_tx_mask_o
|
→
|
|
|
|
|
|
|
|
|
RX DMA interrupt:
|
|
|
|
|
irq_rx_i
|
←
|
|
|
|
irq_rx_ack_o
|
→
|
|
|
|
|
|
|
|
|
TX timestamp available:
|
|
|
|
|
irq_txts_i
|
←
|
HW prefix:
|
minic_mcr
|
HW address:
|
0x0
|
C prefix:
|
MCR
|
C offset:
|
0x0
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
RX_CLASS[7:0]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
RX_EN
|
RX_FULL
|
RX_READY
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
-
|
-
|
-
|
-
|
-
|
TX_ERROR
|
TX_IDLE
|
TX_START
|
-
TX_START
[write-only]: TX DMA start
write 1: starts the DMA transmission of TX descriptors placed in the DMA buffer, write 0: no effect
-
TX_IDLE
[read-only]: TX DMA idle
1: TX DMA engine is idle.
0: TX DMA engine is busy, don't touch the buffer
-
TX_ERROR
[read-only]: TX DMA error
1: an error occured during the TX DMA transfer. The address at which the error occured is kept in TX_ADDR register
-
RX_READY
[read-only]: RX DMA ready
1: RX buffer contains at least one packet
-
RX_FULL
[read-only]: RX DMA buffer full
1: RX buffer is full
-
RX_EN
[read/write]: RX DMA enable
1: RX buffer is allocated and initialized by the host, the miNIC can receive packets
0: RX buffer not ready, reception is disabled
-
RX_CLASS
[read/write]: RX Accepted Packet Classes
HW prefix:
|
minic_tx_addr
|
HW address:
|
0x1
|
C prefix:
|
TX_ADDR
|
C offset:
|
0x4
|
Address of the start of TX buffer:
read: base address of the last transmitted TX descriptor
write: base address of the first descriptor to transmit
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
TX_ADDR[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
TX_ADDR[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
TX_ADDR[7:0]
|
|
|
|
|
|
|
|
-
TX_ADDR
[read/write]: TX DMA buffer address
HW prefix:
|
minic_rx_addr
|
HW address:
|
0x2
|
C prefix:
|
RX_ADDR
|
C offset:
|
0x8
|
Address of the start of RX buffer:
read: address of the last received RX descriptor
write: base address of the RX buffer
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
RX_ADDR[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
RX_ADDR[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
RX_ADDR[7:0]
|
|
|
|
|
|
|
|
-
RX_ADDR
[read/write]: RX DMA buffer address
HW prefix:
|
minic_rx_size
|
HW address:
|
0x3
|
C prefix:
|
RX_SIZE
|
C offset:
|
0xc
|
Size of RX buffer in 32-bit words
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
RX_SIZE[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
RX_SIZE[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
RX_SIZE[7:0]
|
|
|
|
|
|
|
|
-
RX_SIZE
[read/write]: RX available words
HW prefix:
|
minic_rx_avail
|
HW address:
|
0x4
|
C prefix:
|
RX_AVAIL
|
C offset:
|
0x10
|
Number of available 32-bit words in the RX buffer
read: available words in RX buffer
write: increment available words in RX buffer
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
RX_AVAIL[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
RX_AVAIL[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
RX_AVAIL[7:0]
|
|
|
|
|
|
|
|
-
RX_AVAIL
[read/write]: RX available words
HW prefix:
|
minic_tsr0
|
HW address:
|
0x5
|
C prefix:
|
TSR0
|
C offset:
|
0x14
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
FID[15:10]
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
FID[9:2]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
FID[1:0]
|
PID[4:0]
|
VALID
|
|
|
|
|
|
-
VALID
[read-only]: Timestamp valid
-
PID
[read-only]: Port ID
-
FID
[read-only]: Frame ID
HW prefix:
|
minic_tsr1
|
HW address:
|
0x6
|
C prefix:
|
TSR1
|
C offset:
|
0x18
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
TSVAL[31:24]
|
|
|
|
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
TSVAL[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
TSVAL[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
TSVAL[7:0]
|
|
|
|
|
|
|
|
-
TSVAL
[read-only]: Timestamp value
HW prefix:
|
minic_dbgr
|
HW address:
|
0x7
|
C prefix:
|
DBGR
|
C offset:
|
0x1c
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
WB_IRQ_VAL
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
IRQ_CNT[23:16]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
IRQ_CNT[15:8]
|
|
|
|
|
|
|
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
IRQ_CNT[7:0]
|
|
|
|
|
|
|
|
-
IRQ_CNT
[read-only]: interrupt counter
-
WB_IRQ_VAL
[read-only]: status of wb_irq_o line
HW prefix:
|
minic_mprot
|
HW address:
|
0x8
|
C prefix:
|
MPROT
|
C offset:
|
0x20
|
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
HI[15:8]
|
|
|
|
|
|
|
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
HI[7:0]
|
|
|
|
|
|
|
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
LO[15:8]
|
|
|
|
|
|
|
|
-
LO
[read/write]: address range lo
-
HI
[read/write]: address range hi
HW prefix:
|
minic_eic_idr
|
HW address:
|
0x10
|
C prefix:
|
EIC_IDR
|
C offset:
|
0x40
|
Writing 1 disables handling of the interrupt associated with corresponding bit. Writin 0 has no effect.
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
-
|
-
|
-
|
-
|
-
|
TXTS
|
RX
|
TX
|
-
TX
[write-only]: TX DMA interrupt
write 1: disable interrupt 'TX DMA interrupt'
write 0: no effect
-
RX
[write-only]: RX DMA interrupt
write 1: disable interrupt 'RX DMA interrupt'
write 0: no effect
-
TXTS
[write-only]: TX timestamp available
write 1: disable interrupt 'TX timestamp available'
write 0: no effect
HW prefix:
|
minic_eic_ier
|
HW address:
|
0x11
|
C prefix:
|
EIC_IER
|
C offset:
|
0x44
|
Writing 1 enables handling of the interrupt associated with corresponding bit. Writin 0 has no effect.
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
-
|
-
|
-
|
-
|
-
|
TXTS
|
RX
|
TX
|
-
TX
[write-only]: TX DMA interrupt
write 1: enable interrupt 'TX DMA interrupt'
write 0: no effect
-
RX
[write-only]: RX DMA interrupt
write 1: enable interrupt 'RX DMA interrupt'
write 0: no effect
-
TXTS
[write-only]: TX timestamp available
write 1: enable interrupt 'TX timestamp available'
write 0: no effect
HW prefix:
|
minic_eic_imr
|
HW address:
|
0x12
|
C prefix:
|
EIC_IMR
|
C offset:
|
0x48
|
Shows which interrupts are enabled. 1 means that the interrupt associated with the bitfield is enabled
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
-
|
-
|
-
|
-
|
-
|
TXTS
|
RX
|
TX
|
-
TX
[read-only]: TX DMA interrupt
read 1: interrupt 'TX DMA interrupt' is enabled
read 0: interrupt 'TX DMA interrupt' is disabled
-
RX
[read-only]: RX DMA interrupt
read 1: interrupt 'RX DMA interrupt' is enabled
read 0: interrupt 'RX DMA interrupt' is disabled
-
TXTS
[read-only]: TX timestamp available
read 1: interrupt 'TX timestamp available' is enabled
read 0: interrupt 'TX timestamp available' is disabled
HW prefix:
|
minic_eic_isr
|
HW address:
|
0x13
|
C prefix:
|
EIC_ISR
|
C offset:
|
0x4c
|
Each bit represents the state of corresponding interrupt. 1 means the
interrupt is pending. Writing 1 to a bit clears the corresponding
interrupt. Writing 0 has no effect.
31
|
30
|
29
|
28
|
27
|
26
|
25
|
24
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
23
|
22
|
21
|
20
|
19
|
18
|
17
|
16
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
-
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
-
|
-
|
-
|
-
|
-
|
TXTS
|
RX
|
TX
|
-
TX
[read/write]: TX DMA interrupt
read 1: interrupt 'TX DMA interrupt' is pending
read 0: interrupt not pending
write 1: clear interrupt 'TX DMA interrupt'
write 0: no effect
-
RX
[read/write]: RX DMA interrupt
read 1: interrupt 'RX DMA interrupt' is pending
read 0: interrupt not pending
write 1: clear interrupt 'RX DMA interrupt'
write 0: no effect
-
TXTS
[read/write]: TX timestamp available
read 1: interrupt 'TX timestamp available' is pending
read 0: interrupt not pending
write 1: clear interrupt 'TX timestamp available'
write 0: no effect
HW prefix:
|
minic_tx
|
C prefix:
|
TX
|
Trigger:
|
high level
|
HW prefix:
|
minic_rx
|
C prefix:
|
RX
|
Trigger:
|
high level
|
HW prefix:
|
minic_txts
|
C prefix:
|
TXTS
|
Trigger:
|
high level
|