Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
x393
Commits
4713fc48
Commit
4713fc48
authored
Oct 24, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed logger for simulation
parent
158be190
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
379 additions
and
61 deletions
+379
-61
mult_saxi_wr.v
axi/mult_saxi_wr.v
+3
-1
mult_saxi_wr_pointers.v
axi/mult_saxi_wr_pointers.v
+10
-2
x393_cocotb_03.sav
cocotb/x393_cocotb_03.sav
+275
-35
x393_cocotb_server.py
cocotb/x393_cocotb_server.py
+12
-1
x393_dut.v
cocotb/x393_dut.v
+52
-1
fpga_version.vh
fpga_version.vh
+2
-1
event_logger.v
logger/event_logger.v
+15
-14
imu_exttime393.v
logger/imu_exttime393.v
+10
-6
No files found.
axi/mult_saxi_wr.v
View file @
4713fc48
...
@@ -427,7 +427,9 @@ module mult_saxi_wr #(
...
@@ -427,7 +427,9 @@ module mult_saxi_wr #(
.
MULT_SAXI_BSLOG3
(
MULT_SAXI_BSLOG3
)
.
MULT_SAXI_BSLOG3
(
MULT_SAXI_BSLOG3
)
)
mult_saxi_wr_pointers_i
(
)
mult_saxi_wr_pointers_i
(
.
mclk
(
mclk
)
,
// input
.
mclk
(
mclk
)
,
// input
.
mrst
(
mrst
)
,
// input
.
aclk
(
aclk
)
,
// input
.
aclk
(
aclk
)
,
// input
.
arst
(
arst
)
,
// input
.
chn_en_mclk
(
en_chn_mclk
)
,
// input[3:0]
.
chn_en_mclk
(
en_chn_mclk
)
,
// input[3:0]
.
sa_len_di
(
cmd_data
[
29
:
0
])
,
// input[29:0]
.
sa_len_di
(
cmd_data
[
29
:
0
])
,
// input[29:0]
.
sa_len_wa
(
cmd_a
[
2
:
0
])
,
// input[2:0]
.
sa_len_wa
(
cmd_a
[
2
:
0
])
,
// input[2:0]
...
@@ -549,7 +551,7 @@ module mult_saxi_wr #(
...
@@ -549,7 +551,7 @@ module mult_saxi_wr #(
.
stb
(
cmd_stb
)
,
// input
.
stb
(
cmd_stb
)
,
// input
.
addr
(
cmd_a
)
,
// output[3:0]
.
addr
(
cmd_a
)
,
// output[3:0]
.
data
(
cmd_data
)
,
// output[31:0]
.
data
(
cmd_data
)
,
// output[31:0]
.
we
(
{
cmd_we_sa_len
,
we_ctrl
,
irq_log_we
}
)
// output
.
we
(
{
irq_log_we
,
we_ctrl
,
cmd_we_sa_len
}
)
// output
)
;
)
;
// now - converting all to parallel (TODO: use RAM for multi-word status data)
// now - converting all to parallel (TODO: use RAM for multi-word status data)
...
...
axi/mult_saxi_wr_pointers.v
View file @
4713fc48
...
@@ -45,7 +45,9 @@ module mult_saxi_wr_pointers#(
...
@@ -45,7 +45,9 @@ module mult_saxi_wr_pointers#(
parameter
MULT_SAXI_BSLOG3
=
4
parameter
MULT_SAXI_BSLOG3
=
4
)(
)(
input
mclk
,
// system clock
input
mclk
,
// system clock
input
mrst
,
//
input
aclk
,
// global clock to run s_axi (@150MHz?)
input
aclk
,
// global clock to run s_axi (@150MHz?)
input
arst
,
//
input
[
3
:
0
]
chn_en_mclk
,
// enable this channle ( 0 - reset)
input
[
3
:
0
]
chn_en_mclk
,
// enable this channle ( 0 - reset)
input
[
29
:
0
]
sa_len_di
,
// input data to write pointers address/data
input
[
29
:
0
]
sa_len_di
,
// input data to write pointers address/data
input
[
2
:
0
]
sa_len_wa
,
// channel address to write sa/lengths
input
[
2
:
0
]
sa_len_wa
,
// channel address to write sa/lengths
...
@@ -57,7 +59,7 @@ module mult_saxi_wr_pointers#(
...
@@ -57,7 +59,7 @@ module mult_saxi_wr_pointers#(
// provide address and burst length for AXI @aclk, will stay until ackn
// provide address and burst length for AXI @aclk, will stay until ackn
output
reg
[
29
:
0
]
axi_addr
,
output
reg
[
29
:
0
]
axi_addr
,
output
reg
[
3
:
0
]
axi_len
,
output
reg
[
3
:
0
]
axi_len
,
// write data to external point
re
memory (to be read out by PIO) @ aclk
// write data to external point
er
memory (to be read out by PIO) @ aclk
// alternatively - read out directly from ptr_ram?
// alternatively - read out directly from ptr_ram?
output
[
29
:
0
]
pntr_wd
,
// @aclk
output
[
29
:
0
]
pntr_wd
,
// @aclk
output
[
1
:
0
]
pntr_wa
,
output
[
1
:
0
]
pntr_wa
,
...
@@ -92,6 +94,7 @@ module mult_saxi_wr_pointers#(
...
@@ -92,6 +94,7 @@ module mult_saxi_wr_pointers#(
reg
[
30
:
0
]
ptr_rollover
;
reg
[
30
:
0
]
ptr_rollover
;
reg
[
4
:
0
]
burst_size
;
// ROM
reg
[
4
:
0
]
burst_size
;
// ROM
wire
[
29
:
0
]
ptr_wd
;
wire
[
29
:
0
]
ptr_wd
;
reg
arst_d
;
//delayed version of arst
assign
reset_rq_enc
=
{
reset_rq_pri
[
3
]
|
reset_rq_pri
[
2
]
,
assign
reset_rq_enc
=
{
reset_rq_pri
[
3
]
|
reset_rq_pri
[
2
]
,
reset_rq_pri
[
3
]
|
reset_rq_pri
[
1
]
};
reset_rq_pri
[
3
]
|
reset_rq_pri
[
1
]
};
...
@@ -134,7 +137,12 @@ module mult_saxi_wr_pointers#(
...
@@ -134,7 +137,12 @@ module mult_saxi_wr_pointers#(
always
@
(
posedge
aclk
)
begin
always
@
(
posedge
aclk
)
begin
chn_en_aclk
<=
chn_en_mclk
;
chn_en_aclk
<=
chn_en_mclk
;
reset_rq
<=
rst_pntr_aclk
|
(
reset_rq
&
~
(
{
4
{
resetting
[
0
]
&~
resetting
[
1
]
}}
&
reset_rq_pri
))
;
arst_d
<=
arst
;
// probably not needed?
if
(
arst
)
reset_rq
<=
~
0
;
// or ~0 ? Add auto reset after
// else reset_rq <= {4{arst_d}} | rst_pntr_aclk | (reset_rq & ~({4{resetting[0] &~ resetting[1]}} & reset_rq_pri));
else
reset_rq
<=
rst_pntr_aclk
|
(
reset_rq
&
~
(
{
4
{
resetting
[
0
]
&~
resetting
[
1
]
}}
&
reset_rq_pri
))
;
if
(
start_resetting_w
)
reset_rq_pri
<=
{
reset_rq
[
3
]
&
~
(
|
reset_rq
[
2
:
0
])
,
if
(
start_resetting_w
)
reset_rq_pri
<=
{
reset_rq
[
3
]
&
~
(
|
reset_rq
[
2
:
0
])
,
reset_rq
[
2
]
&
~
(
|
reset_rq
[
1
:
0
])
,
reset_rq
[
2
]
&
~
(
|
reset_rq
[
1
:
0
])
,
reset_rq
[
1
]
&
~
reset_rq
[
0
]
,
reset_rq
[
1
]
&
~
reset_rq
[
0
]
,
...
...
cocotb/x393_cocotb_03.sav
View file @
4713fc48
[*]
[*]
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*]
Sun Oct 23 15:34:21
2016
[*]
Mon Oct 24 00:30:16
2016
[*]
[*]
[dumpfile] "/home/eyesis/git/x393-neon/simulation/x393_dut-20161023
002450549
.fst"
[dumpfile] "/home/eyesis/git/x393-neon/simulation/x393_dut-20161023
171014405
.fst"
[dumpfile_mtime] "
Sun Oct 23 07:43:15
2016"
[dumpfile_mtime] "
Mon Oct 24 00:23:04
2016"
[dumpfile_size]
421314821
[dumpfile_size]
364619214
[savefile] "/home/eyesis/git/x393-neon/cocotb/x393_cocotb_03.sav"
[savefile] "/home/eyesis/git/x393-neon/cocotb/x393_cocotb_03.sav"
[timestart] 0
[timestart] 0
[size] 1814 1171
[size] 1814 1171
[pos]
192
0 0
[pos] 0 0
*-26.
672018 548510000
53094051 136169617 216213845 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-26.
593010 46043333
53094051 136169617 216213845 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] x393_dut.
[treeopen] x393_dut.
[treeopen] x393_dut.simul_sensor12bits_2_i.
[treeopen] x393_dut.simul_sensor12bits_2_i.
[treeopen] x393_dut.simul_sensor12bits_3_i.
[treeopen] x393_dut.simul_sensor12bits_3_i.
...
@@ -19,13 +19,14 @@
...
@@ -19,13 +19,14 @@
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_metadata_i.
[treeopen] x393_dut.x393_i.compressor393_i.cmprs_channel_block[0].jp_channel_i.huffman_stuffer_meta_i.bit_stuffer_metadata_i.
[treeopen] x393_dut.x393_i.event_logger_i.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_spi.
[treeopen] x393_dut.x393_i.event_logger_i.i_imu_spi.
[treeopen] x393_dut.x393_i.event_logger_i.i_logger_arbiter.
[treeopen] x393_dut.x393_i.event_logger_i.i_logger_arbiter.
[treeopen] x393_dut.x393_i.event_logger_i.i_nmea_decoder.
[treeopen] x393_dut.x393_i.event_logger_i.i_nmea_decoder.
[treeopen] x393_dut.x393_i.event_logger_i.i_rs232_rcv.
[treeopen] x393_dut.x393_i.event_logger_i.i_rs232_rcv.
[treeopen] x393_dut.x393_i.mult_saxi_wr_i.
[treeopen] x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[0].sensor_channel_i.sensor_i2c_io_i.
...
@@ -40,10 +41,10 @@
...
@@ -40,10 +41,10 @@
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_parallel12_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_parallel12_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_sync_i.
[treeopen] x393_dut.x393_i.sensors393_i.sensor_channel_block[3].sensor_channel_i.sens_sync_i.
[treeopen] x393_dut.x393_i.timing393_i.camsync393_i.
[treeopen] x393_dut.x393_i.timing393_i.camsync393_i.
[sst_width] 3
80
[sst_width] 3
98
[signals_width]
259
[signals_width]
323
[sst_expanded] 1
[sst_expanded] 1
[sst_vpaned_height] 48
7
[sst_vpaned_height] 48
6
@820
@820
x393_dut.TEST_TITLE[639:0]
x393_dut.TEST_TITLE[639:0]
@c00200
@c00200
...
@@ -835,8 +836,6 @@ x393_dut.x393_i.ts_pre_stb[3:0]
...
@@ -835,8 +836,6 @@ x393_dut.x393_i.ts_pre_stb[3:0]
(3)x393_dut.x393_i.ts_pre_stb[3:0]
(3)x393_dut.x393_i.ts_pre_stb[3:0]
@1001200
@1001200
-group_end
-group_end
@200
-
@c00022
@c00022
x393_dut.x393_i.event_logger_i.ext_di[9:0]
x393_dut.x393_i.event_logger_i.ext_di[9:0]
@28
@28
...
@@ -1123,8 +1122,14 @@ x393_dut.x393_i.event_logger_i.i_nmea_decoder.ser_di
...
@@ -1123,8 +1122,14 @@ x393_dut.x393_i.event_logger_i.i_nmea_decoder.ser_di
x393_dut.x393_i.event_logger_i.i_nmea_decoder.ser_stb
x393_dut.x393_i.event_logger_i.i_nmea_decoder.ser_stb
x393_dut.x393_i.event_logger_i.i_nmea_decoder.nmea_sent_start
x393_dut.x393_i.event_logger_i.i_nmea_decoder.nmea_sent_start
x393_dut.x393_i.event_logger_i.i_nmea_decoder.rdy
x393_dut.x393_i.event_logger_i.i_nmea_decoder.rdy
@22
[color] 2
x393_dut.x393_i.event_logger_i.i_nmea_decoder.raddr[4:0]
@28
[color] 2
x393_dut.x393_i.event_logger_i.i_nmea_decoder.rd_stb
x393_dut.x393_i.event_logger_i.i_nmea_decoder.rd_stb
@22
@22
[color] 2
x393_dut.x393_i.event_logger_i.i_nmea_decoder.rdata[15:0]
x393_dut.x393_i.event_logger_i.i_nmea_decoder.rdata[15:0]
@c00022
@c00022
x393_dut.x393_i.event_logger_i.i_nmea_decoder.debug[23:0]
x393_dut.x393_i.event_logger_i.i_nmea_decoder.debug[23:0]
...
@@ -1197,9 +1202,27 @@ x393_dut.x393_i.event_logger_i.i_nmea_decoder.we
...
@@ -1197,9 +1202,27 @@ x393_dut.x393_i.event_logger_i.i_nmea_decoder.we
@22
@22
x393_dut.x393_i.event_logger_i.i_nmea_decoder.wa[4:0]
x393_dut.x393_i.event_logger_i.i_nmea_decoder.wa[4:0]
x393_dut.x393_i.event_logger_i.i_nmea_decoder.wd[7:0]
x393_dut.x393_i.event_logger_i.i_nmea_decoder.wd[7:0]
@200
-
@28
x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_stb
@c00022
x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
@28
(0)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
(1)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
(2)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
(3)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
(4)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
(5)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
(6)x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble_count[6:0]
@1401200
-group_end
@22
x393_dut.x393_i.event_logger_i.i_nmea_decoder.nibble[3:0]
@1401200
@1401200
-nmea_decoder
-nmea_decoder
@
8
00200
@
c
00200
-imu_exttime
-imu_exttime
@28
@28
x393_dut.x393_i.event_logger_i.i_imu_exttime.mclk
x393_dut.x393_i.event_logger_i.i_imu_exttime.mclk
...
@@ -1208,10 +1231,10 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.xclk
...
@@ -1208,10 +1231,10 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.xclk
x393_dut.x393_i.event_logger_i.i_imu_exttime.xrst
x393_dut.x393_i.event_logger_i.i_imu_exttime.xrst
x393_dut.x393_i.event_logger_i.i_imu_exttime.ts
x393_dut.x393_i.event_logger_i.i_imu_exttime.ts
x393_dut.x393_i.event_logger_i.i_imu_exttime.rdy
x393_dut.x393_i.event_logger_i.i_imu_exttime.rdy
@29
x393_dut.x393_i.event_logger_i.i_imu_exttime.rd_stb
x393_dut.x393_i.event_logger_i.i_imu_exttime.rd_stb
@28
x393_dut.x393_i.event_logger_i.i_imu_exttime.ts_full
x393_dut.x393_i.event_logger_i.i_imu_exttime.ts_full
x393_dut.x393_i.event_logger_i.i_imu_exttime.rd_start
x393_dut.x393_i.event_logger_i.i_imu_exttime.rd_start_mclk
@22
@22
x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_data[7:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_data[7:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_data_r[7:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_data_r[7:0]
...
@@ -1220,16 +1243,7 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_data_r[7:0]
...
@@ -1220,16 +1243,7 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_data_r[7:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.sel_chn[1:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.sel_chn[1:0]
(1)x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_selected[1:0]
(1)x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_selected[1:0]
(2)x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_cntr[2:0]
(2)x393_dut.x393_i.event_logger_i.i_imu_exttime.copy_cntr[2:0]
@c08022
x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[2:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[4:0]
@28
(0)x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[4:0]
(1)x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[4:0]
(2)x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[4:0]
(3)x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[4:0]
(4)x393_dut.x393_i.event_logger_i.i_imu_exttime.raddr[4:0]
@1401200
-group_end
@c00022
@c00022
x393_dut.x393_i.event_logger_i.i_imu_exttime.rdata[15:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.rdata[15:0]
@28
@28
...
@@ -1300,9 +1314,7 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
...
@@ -1300,9 +1314,7 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
(1)x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
(1)x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
(2)x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
(2)x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
(3)x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
(3)x393_dut.x393_i.event_logger_i.i_imu_exttime.in_full[3:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.rd_start
x393_dut.x393_i.event_logger_i.i_imu_exttime.en
x393_dut.x393_i.event_logger_i.i_imu_exttime.en
x393_dut.x393_i.event_logger_i.i_imu_exttime.rd_start_mclk
@1001200
@1001200
-group_end
-group_end
@28
@28
...
@@ -1388,9 +1400,44 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.rpntr[3:0]
...
@@ -1388,9 +1400,44 @@ x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.rpntr[3:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.dout[7:0]
x393_dut.x393_i.event_logger_i.i_imu_exttime.timestamp_fifo_chn0_i.dout[7:0]
@200
@200
-
-
@1
000
200
@1
401
200
-imu_exttime
-imu_exttime
@800200
@c00200
-imu_spi
-external
@28
x393_dut.IMU_CS
x393_dut.IMU_MOSI
x393_dut.IMU_MISO
@22
x393_dut.IMU_LOOPBACK[15:0]
@28
x393_dut.IMU_SCLK_OUT
@200
-
@28
(6)x393_dut.x393_i.gpio393_i.ext_pins[9:0]
(7)x393_dut.x393_i.gpio393_i.ext_pins[9:0]
@1401200
-external
@28
x393_dut.x393_i.event_logger_i.i_imu_spi.mosi
x393_dut.x393_i.event_logger_i.i_imu_spi.miso
x393_dut.x393_i.event_logger_i.i_imu_spi.sda
x393_dut.x393_i.event_logger_i.i_imu_spi.sda_en
x393_dut.x393_i.event_logger_i.i_imu_spi.scl
x393_dut.x393_i.event_logger_i.i_imu_spi.scl_en
x393_dut.x393_i.event_logger_i.i_imu_spi.ts
x393_dut.x393_i.event_logger_i.i_imu_spi.rdy
x393_dut.x393_i.event_logger_i.i_imu_spi.rd_stb
@22
x393_dut.x393_i.event_logger_i.i_imu_spi.raddr[4:0]
x393_dut.x393_i.event_logger_i.i_imu_spi.rdata[15:0]
@28
x393_dut.x393_i.event_logger_i.i_imu_spi.stall
@1401200
-imu_spi
@c00200
-logger_arbiter
-logger_arbiter
@28
@28
x393_dut.x393_i.event_logger_i.i_logger_arbiter.rst
x393_dut.x393_i.event_logger_i.i_logger_arbiter.rst
...
@@ -1444,7 +1491,7 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
...
@@ -1444,7 +1491,7 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
(2)x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
(2)x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
(3)x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
(3)x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
(4)x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
(4)x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
@140120
2
@140120
0
-group_end
-group_end
@c08022
@c08022
x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
...
@@ -1458,7 +1505,7 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
...
@@ -1458,7 +1505,7 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr[4:0]
-group_end
-group_end
@28
@28
x393_dut.x393_i.event_logger_i.i_logger_arbiter.pre_nxt
x393_dut.x393_i.event_logger_i.i_logger_arbiter.pre_nxt
@
c
00022
@
8
00022
x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
@28
@28
(0)x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
(0)x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
...
@@ -1466,7 +1513,7 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
...
@@ -1466,7 +1513,7 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
(2)x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
(2)x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
(3)x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
(3)x393_dut.x393_i.event_logger_i.i_logger_arbiter.nxt[3:0]
x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr_last
x393_dut.x393_i.event_logger_i.i_logger_arbiter.seq_cntr_last
@1
4
01200
@1
0
01200
-group_end
-group_end
@28
@28
x393_dut.x393_i.event_logger_i.i_logger_arbiter.channel[1:0]
x393_dut.x393_i.event_logger_i.i_logger_arbiter.channel[1:0]
...
@@ -1481,18 +1528,77 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.chn_servicing[3:0]
...
@@ -1481,18 +1528,77 @@ x393_dut.x393_i.event_logger_i.i_logger_arbiter.chn_servicing[3:0]
@28
@28
x393_dut.x393_i.event_logger_i.i_logger_arbiter.wstart
x393_dut.x393_i.event_logger_i.i_logger_arbiter.wstart
x393_dut.x393_i.event_logger_i.i_logger_arbiter.chn1hot[3:1]
x393_dut.x393_i.event_logger_i.i_logger_arbiter.chn1hot[3:1]
@1
000
200
@1
401
200
-logger_arbiter
-logger_arbiter
@28
@28
x393_dut.x393_i.event_logger_i.gps_pulse1sec_single
@c00022
x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
@28
(0)x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
(1)x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
(2)x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
(3)x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
@1401200
-group_end
@c00022
x393_dut.x393_i.event_logger_i.timestamp_request_long[3:0]
@28
(0)x393_dut.x393_i.event_logger_i.timestamp_request_long[3:0]
(1)x393_dut.x393_i.event_logger_i.timestamp_request_long[3:0]
(2)x393_dut.x393_i.event_logger_i.timestamp_request_long[3:0]
(3)x393_dut.x393_i.event_logger_i.timestamp_request_long[3:0]
@1401200
-group_end
@c00022
x393_dut.x393_i.event_logger_i.timestamp_ackn[3:0]
@28
(0)x393_dut.x393_i.event_logger_i.timestamp_ackn[3:0]
(1)x393_dut.x393_i.event_logger_i.timestamp_ackn[3:0]
(2)x393_dut.x393_i.event_logger_i.timestamp_ackn[3:0]
(3)x393_dut.x393_i.event_logger_i.timestamp_ackn[3:0]
@1401200
-group_end
@22
x393_dut.x393_i.event_logger_i.channel_ready[3:0]
@c00022
x393_dut.x393_i.event_logger_i.channel_next[3:0]
@28
(0)x393_dut.x393_i.event_logger_i.channel_next[3:0]
(1)x393_dut.x393_i.event_logger_i.channel_next[3:0]
(2)x393_dut.x393_i.event_logger_i.channel_next[3:0]
(3)x393_dut.x393_i.event_logger_i.channel_next[3:0]
@1401200
-group_end
@28
x393_dut.x393_i.event_logger_i.mux_rdy_source
x393_dut.x393_i.event_logger_i.mux_rdy_source
x393_dut.x393_i.event_logger_i.mux_data_valid
x393_dut.x393_i.event_logger_i.mux_data_valid
x393_dut.x393_i.event_logger_i.ts_en
x393_dut.x393_i.event_logger_i.ts_en
@22
@22
x393_dut.x393_i.event_logger_i.timestamps_rdata[15:0]
x393_dut.x393_i.event_logger_i.timestamps_rdata[15:0]
@c00022
x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
@28
(0)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(1)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(2)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(3)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(4)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(5)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(6)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(7)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(8)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(9)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(10)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(11)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(12)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(13)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(14)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
(15)x393_dut.x393_i.event_logger_i.mux_data_source[15:0]
@1401200
-group_end
@22
x393_dut.x393_i.event_logger_i.mux_data_final[15:0]
x393_dut.x393_i.event_logger_i.mux_data_final[15:0]
@200
-
@800022
@800022
x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
@28
@28
...
@@ -1502,8 +1608,142 @@ x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
...
@@ -1502,8 +1608,142 @@ x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
(3)x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
(3)x393_dut.x393_i.event_logger_i.timestamp_request[3:0]
@1001200
@1001200
-group_end
-group_end
@28
x393_dut.x393_i.event_logger_i.mclk
@22
[color] 3
x393_dut.x393_i.event_logger_i.data_out[15:0]
@28
[color] 3
x393_dut.x393_i.event_logger_i.data_out_stb
@22
[color] 3
x393_dut.x393_i.event_logger_i.sample_counter[23:0]
@c00200
-x393
@22
x393_dut.x393_i.logger_out[15:0]
@28
x393_dut.x393_i.logger_stb
@1401200
-x393
@1000200
@1000200
-event_logger
-event_logger
@800200
-mult_saxi_wr_inbuf
@28
x393_dut.x393_i.mult_saxi_wr_inbuf_i.mclk
x393_dut.x393_i.mult_saxi_wr_inbuf_i.en
@22
x393_dut.x393_i.mult_saxi_wr_inbuf_i.data_in[15:0]
@28
x393_dut.x393_i.mult_saxi_wr_inbuf_i.valid
x393_dut.x393_i.mult_saxi_wr_inbuf_i.has_burst
x393_dut.x393_i.mult_saxi_wr_inbuf_i.read_burst
@22
x393_dut.x393_i.mult_saxi_wr_inbuf_i.data_out[31:0]
@1000200
-mult_saxi_wr_inbuf
@800200
-mult_saxi_wr
@22
x393_dut.x393_i.mult_saxi_wr_i.cmd_ad[7:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.cmd_stb
x393_dut.x393_i.mult_saxi_wr_i.pre_valid_chn0
x393_dut.x393_i.mult_saxi_wr_i.irq_log_we
x393_dut.x393_i.mult_saxi_wr_i.we_ctrl
x393_dut.x393_i.mult_saxi_wr_i.cmd_we_sa_len
@22
x393_dut.x393_i.mult_saxi_wr_i.cmd_a[3:0]
x393_dut.x393_i.mult_saxi_wr_i.cmd_data[31:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.saxi_awready
x393_dut.x393_i.mult_saxi_wr_i.saxi_awvalid
@22
x393_dut.x393_i.mult_saxi_wr_i.saxi_awaddr[31:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.saxi_wready
x393_dut.x393_i.mult_saxi_wr_i.saxi_wvalid
@22
x393_dut.x393_i.mult_saxi_wr_i.saxi_wdata[31:0]
x393_dut.x393_i.mult_saxi_wr_i.axi_addr[29:0]
@800200
-mult_saxi_wr_pointers
@22
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.chn[1:0]
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.start
@28
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.busy
@22
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.chn_en_mclk[3:0]
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.chn_en_aclk[3:0]
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.axi_len[3:0]
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.axi_addr[29:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.ptr_we
@22
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.irqs[3:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.aclk
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_aclk
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.en_aclk
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.busy_r
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst
@c00022
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_mclk[3:0]
@28
(0)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_mclk[3:0]
(1)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_mclk[3:0]
(2)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_mclk[3:0]
(3)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_mclk[3:0]
@1401200
-group_end
@c00022
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_aclk[3:0]
@28
(0)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_aclk[3:0]
(1)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_aclk[3:0]
(2)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_aclk[3:0]
(3)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.rst_pntr_aclk[3:0]
@1401200
-group_end
@800022
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.reset_rq[3:0]
@22
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.reset_rq_pri[3:0]
@28
(0)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.reset_rq[3:0]
(1)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.reset_rq[3:0]
(2)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.reset_rq[3:0]
(3)x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.reset_rq[3:0]
@1001200
-group_end
@28
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.start_resetting_w
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.resetting[1:0]
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.seq[1:0]
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.pntr_we
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.pntr_wa[1:0]
@22
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.pntr_wd[29:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.sa_len_we
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.sa_len_wa[2:0]
@22
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.sa_len_di[29:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.sa_len_ra[2:0]
@23
x393_dut.x393_i.mult_saxi_wr_i.mult_saxi_wr_pointers_i.sa_len_ram_out[29:0]
@28
x393_dut.x393_i.mult_saxi_wr_i.mrst
x393_dut.x393_i.mult_saxi_wr_i.arst
@200
-
@1000200
-mult_saxi_wr_pointers
-mult_saxi_wr
@c00200
@c00200
-IMU_
-IMU_
@28
@28
...
...
cocotb/x393_cocotb_server.py
View file @
4713fc48
...
@@ -140,7 +140,16 @@ class X393_cocotb_server(object):
...
@@ -140,7 +140,16 @@ class X393_cocotb_server(object):
data_bytes
=
4
,
data_bytes
=
4
,
autoflush
=
self
.
autoflush
,
autoflush
=
self
.
autoflush
,
blatency
=
5
)
blatency
=
5
)
#event logger from FPGA
self
.
saxigp1
=
SAXIWrSim
(
entity
=
dut
,
name
=
"saxigp1"
,
clock
=
dut
.
saxi0_aclk
,
mempath
=
self
.
mempath
,
memhigh
=
self
.
memhigh
,
data_bytes
=
4
,
autoflush
=
self
.
autoflush
,
blatency
=
5
)
level
=
logging
.
DEBUG
if
debug
else
logging
.
INFO
# WARNING
level
=
logging
.
DEBUG
if
debug
else
logging
.
INFO
# WARNING
self
.
dut
.
_log
.
info
(
'Set debug level '
+
str
(
level
)
+
", debug="
+
str
(
debug
))
self
.
dut
.
_log
.
info
(
'Set debug level '
+
str
(
level
)
+
", debug="
+
str
(
debug
))
...
@@ -150,6 +159,7 @@ class X393_cocotb_server(object):
...
@@ -150,6 +159,7 @@ class X393_cocotb_server(object):
self
.
saxihp0w
.
log
.
setLevel
(
level
)
self
.
saxihp0w
.
log
.
setLevel
(
level
)
self
.
saxihp1w
.
log
.
setLevel
(
level
)
self
.
saxihp1w
.
log
.
setLevel
(
level
)
self
.
saxigp0
.
log
.
setLevel
(
level
)
self
.
saxigp0
.
log
.
setLevel
(
level
)
self
.
saxigp1
.
log
.
setLevel
(
level
)
#Initialize socket
#Initialize socket
self
.
PORT
=
port
self
.
PORT
=
port
...
@@ -208,6 +218,7 @@ class X393_cocotb_server(object):
...
@@ -208,6 +218,7 @@ class X393_cocotb_server(object):
self
.
saxihp0w_thread
=
cocotb
.
fork
(
self
.
saxihp0w
.
saxi_wr_run
())
self
.
saxihp0w_thread
=
cocotb
.
fork
(
self
.
saxihp0w
.
saxi_wr_run
())
self
.
saxihp1w_thread
=
cocotb
.
fork
(
self
.
saxihp1w
.
saxi_wr_run
())
self
.
saxihp1w_thread
=
cocotb
.
fork
(
self
.
saxihp1w
.
saxi_wr_run
())
self
.
saxigp0_thread
=
cocotb
.
fork
(
self
.
saxigp0
.
saxi_wr_run
())
self
.
saxigp0_thread
=
cocotb
.
fork
(
self
.
saxigp0
.
saxi_wr_run
())
self
.
saxigp1_thread
=
cocotb
.
fork
(
self
.
saxigp1
.
saxi_wr_run
())
self
.
soc_conn
.
send
(
self
.
cmd
.
toJSON
(
0
)
+
"
\n
"
)
self
.
soc_conn
.
send
(
self
.
cmd
.
toJSON
(
0
)
+
"
\n
"
)
self
.
dut
.
_log
.
debug
(
'Sent 0 to the socket'
)
self
.
dut
.
_log
.
debug
(
'Sent 0 to the socket'
)
started
=
True
started
=
True
...
...
cocotb/x393_dut.v
View file @
4713fc48
...
@@ -145,6 +145,19 @@ module x393_dut#(
...
@@ -145,6 +145,19 @@ module x393_dut#(
input
[
3
:
0
]
saxigp0_bresp_latency
,
input
[
3
:
0
]
saxigp0_bresp_latency
,
output
[
3
:
0
]
saxigp0_wr_qos
,
output
[
3
:
0
]
saxigp0_wr_qos
,
// Event logger FPGA -> CPU
output
[
31
:
0
]
saxigp1_wr_address
,
output
[
5
:
0
]
saxigp1_wid
,
output
saxigp1_wr_valid
,
input
saxigp1_wr_ready
,
output
[
31
:
0
]
saxigp1_wr_data
,
output
[
3
:
0
]
saxigp1_wr_stb
,
output
[
1
:
0
]
saxigp1_wr_size
,
input
[
3
:
0
]
saxigp1_bresp_latency
,
output
[
3
:
0
]
saxigp1_wr_qos
,
output
[
NUM_INTERRUPTS
-
1
:
0
]
irq_r
,
// {x393_i.sata_irq, x393_i.cmprs_irq[3:0], x393_i.frseq_irq[3:0]};
output
[
NUM_INTERRUPTS
-
1
:
0
]
irq_r
,
// {x393_i.sata_irq, x393_i.cmprs_irq[3:0], x393_i.frseq_irq[3:0]};
// SATA and SATA clock I/O
// SATA and SATA clock I/O
...
@@ -1347,6 +1360,43 @@ simul_axi_hp_wr #(
...
@@ -1347,6 +1360,43 @@ simul_axi_hp_wr #(
.
sim_wr_qos
(
saxigp0_wr_qos
)
// output[3:0]
.
sim_wr_qos
(
saxigp0_wr_qos
)
// output[3:0]
)
;
)
;
// SAXI_GP1 - event logger to system memory
simul_saxi_gp_wr
simul_saxi_gp1_wr_i
(
.
rst
(
RST
)
,
// input
.
aclk
(
saxi0_aclk
)
,
// input
.
aresetn
()
,
// output
.
awaddr
(
x393_i
.
ps7_i
.
SAXIGP1AWADDR
)
,
// input[31:0]
.
awvalid
(
x393_i
.
ps7_i
.
SAXIGP1AWVALID
)
,
// input
.
awready
(
x393_i
.
ps7_i
.
SAXIGP1AWREADY
)
,
// output
.
awid
(
x393_i
.
ps7_i
.
SAXIGP1AWID
)
,
// input[5:0]
.
awlock
(
x393_i
.
ps7_i
.
SAXIGP1AWLOCK
)
,
// input[1:0]
.
awcache
(
x393_i
.
ps7_i
.
SAXIGP1AWCACHE
)
,
// input[3:0]
.
awprot
(
x393_i
.
ps7_i
.
SAXIGP1AWPROT
)
,
// input[2:0]
.
awlen
(
x393_i
.
ps7_i
.
SAXIGP1AWLEN
)
,
// input[3:0]
.
awsize
(
x393_i
.
ps7_i
.
SAXIGP1AWSIZE
)
,
// input[1:0]
.
awburst
(
x393_i
.
ps7_i
.
SAXIGP1AWBURST
)
,
// input[1:0]
.
awqos
(
x393_i
.
ps7_i
.
SAXIGP1AWQOS
)
,
// input[3:0]
.
wdata
(
x393_i
.
ps7_i
.
SAXIGP1WDATA
)
,
// input[31:0]
.
wvalid
(
x393_i
.
ps7_i
.
SAXIGP1WVALID
)
,
// input
.
wready
(
x393_i
.
ps7_i
.
SAXIGP1WREADY
)
,
// output
.
wid
(
x393_i
.
ps7_i
.
SAXIGP1WID
)
,
// input[5:0]
.
wlast
(
x393_i
.
ps7_i
.
SAXIGP1WLAST
)
,
// input
.
wstrb
(
x393_i
.
ps7_i
.
SAXIGP1WSTRB
)
,
// input[3:0]
.
bvalid
(
x393_i
.
ps7_i
.
SAXIGP1BVALID
)
,
// output
.
bready
(
x393_i
.
ps7_i
.
SAXIGP1BREADY
)
,
// input
.
bid
(
x393_i
.
ps7_i
.
SAXIGP1BID
)
,
// output[5:0]
.
bresp
(
x393_i
.
ps7_i
.
SAXIGP1BRESP
)
,
// output[1:0]
.
sim_wr_address
(
saxigp1_wr_address
)
,
// output[31:0]
.
sim_wid
(
saxigp1_wid
)
,
// output[5:0]
.
sim_wr_valid
(
saxigp1_wr_valid
)
,
// output
.
sim_wr_ready
(
saxigp1_wr_ready
)
,
// input
.
sim_wr_data
(
saxigp1_wr_data
)
,
// output[31:0]
.
sim_wr_stb
(
saxigp1_wr_stb
)
,
// output[3:0]
.
sim_wr_size
(
saxigp1_wr_size
)
,
// output[1:0]
.
sim_bresp_latency
(
saxigp1_bresp_latency
)
,
// input[3:0]
.
sim_wr_qos
(
saxigp1_wr_qos
)
// output[3:0]
)
;
// Generate all clocks
// Generate all clocks
simul_clk
#(
simul_clk
#(
...
@@ -1814,8 +1864,9 @@ assign #10 gpio_pins[7] = gpio_pins[8];
...
@@ -1814,8 +1864,9 @@ assign #10 gpio_pins[7] = gpio_pins[8];
reg
[
15
:
0
]
IMU_LOOPBACK
;
reg
[
15
:
0
]
IMU_LOOPBACK
;
always
@
(
negedge
IMU_SCLK_OUT
)
begin
always
@
(
negedge
IMU_SCLK_OUT
)
begin
if
(
!
IMU_CS
)
IMU_LOOPBACK
[
15
:
0
]
<={
IMU_LOOPBACK
[
14
:
0
]
,
IMU_MOSI_D
};
if
(
!
IMU_CS
)
IMU_LOOPBACK
[
15
:
0
]
<={
IMU_LOOPBACK
[
14
:
0
]
,
IMU_MOSI_D
};
end
end
assign
gpio_pins
[
3
]
=
IMU_CS
?
IMU_DATA_READY
:
IMU_LOOPBACK
[
15
]
;
assign
gpio_pins
[
3
]
=
IMU_CS
?
IMU_DATA_READY
:
IMU_LOOPBACK
[
15
]
;
PULLUP
i_IMU_SDA
(
.
O
(
IMU_SDA
))
;
PULLUP
i_IMU_SDA
(
.
O
(
IMU_SDA
))
;
PULLUP
i_IMU_SCL
(
.
O
(
IMU_SCL
))
;
PULLUP
i_IMU_SCL
(
.
O
(
IMU_SCL
))
;
...
...
fpga_version.vh
View file @
4713fc48
...
@@ -35,7 +35,8 @@
...
@@ -35,7 +35,8 @@
* contains all the components and scripts required to completely simulate it
* contains all the components and scripts required to completely simulate it
* with at least one of the Free Software programs.
* with at least one of the Free Software programs.
*/
*/
parameter FPGA_VERSION = 32'h039300c0; //parallel - chnaging LOGGER_PAGE_IMU 3->0 (how it was in 353) -0.044/16, 79.59%
parameter FPGA_VERSION = 32'h039300c1; //parallel - modified after troubleshooting simulation -0.069/41, 79.90 %
// parameter FPGA_VERSION = 32'h039300c0; //parallel - changing LOGGER_PAGE_IMU 3->0 (how it was in 353) -0.044/16, 79.59%
// parameter FPGA_VERSION = 32'h039300bf; //parallel - mask extrenal timestamps mode -0.043/17 79.56%
// parameter FPGA_VERSION = 32'h039300bf; //parallel - mask extrenal timestamps mode -0.043/17 79.56%
// parameter FPGA_VERSION = 32'h039300be; //parallel - adding odd/even pixels shift -0.066/12, 80.26%
// parameter FPGA_VERSION = 32'h039300be; //parallel - adding odd/even pixels shift -0.066/12, 80.26%
// parameter FPGA_VERSION = 32'h039300bd; //hispi, trying the same -0.173/36, 80.95%
// parameter FPGA_VERSION = 32'h039300bd; //hispi, trying the same -0.173/36, 80.95%
...
...
logger/event_logger.v
View file @
4713fc48
...
@@ -124,19 +124,19 @@ module event_logger#(
...
@@ -124,19 +124,19 @@ module event_logger#(
wire
sda
,
sda_en
,
scl
,
scl_en
;
wire
sda
,
sda_en
,
scl
,
scl_en
;
reg
[
6
:
0
]
ctrl_addr
=
7'h0
;
// 0 - period, 1 - reserved, 2..31 - registers to log, >32 - gps parameters, >64 - odometer message
reg
[
6
:
0
]
ctrl_addr
=
7'h0
;
// 0 - period, 1 - reserved, 2..31 - registers to log, >32 - gps parameters, >64 - odometer message
reg
we_d
;
// only if wa was 0
reg
we_d
=
0
;
// only if wa was 0
reg
we_imu
;
reg
we_imu
=
0
;
reg
we_gps
;
reg
we_gps
=
0
;
reg
we_period
;
reg
we_period
=
0
;
reg
we_bit_duration
;
reg
we_bit_duration
=
0
;
reg
we_message
;
reg
we_message
=
0
;
reg
we_config_imu
;
// bits 1:0, 2 - enable slot[1:0]
reg
we_config_imu
=
0
;
// bits 1:0, 2 - enable slot[1:0]
reg
we_config_gps
;
// bits 6:3, 7 - enable - {ext,invert, slot[1:0]} slot==0 - disable
reg
we_config_gps
=
0
;
// bits 6:3, 7 - enable - {ext,invert, slot[1:0]} slot==0 - disable
reg
we_config_msg
;
// bits 12:8,13 - enable - {invert,extinp[3:0]} extinp[3:0]=='hf' - disable
reg
we_config_msg
=
0
;
// bits 12:8,13 - enable - {invert,extinp[3:0]} extinp[3:0]=='hf' - disable
reg
we_config_syn
;
// bit 14, 15 - enable - enable logging external timestamps
reg
we_config_syn
=
0
;
// bit 14, 15 - enable - enable logging external timestamps
reg
we_config_rst
;
// bit 14, 15 - enable - reset
reg
we_config_rst
=
0
;
// bit 14, 15 - enable - reset
reg
we_config_debug
;
// bit 14, 15 - enable - debug bits set
reg
we_config_debug
=
0
;
// bit 14, 15 - enable - debug bits set
reg
we_bitHalfPeriod
;
reg
we_bitHalfPeriod
=
0
;
reg
[
1
:
0
]
config_imu
;
reg
[
1
:
0
]
config_imu
;
...
@@ -263,7 +263,8 @@ module event_logger#(
...
@@ -263,7 +263,8 @@ module event_logger#(
gps_pulse1sec_single
<=
!
gps_pulse1sec_denoise
[
1
]
&&
gps_pulse1sec_denoise
[
0
]
;
gps_pulse1sec_single
<=
!
gps_pulse1sec_denoise
[
1
]
&&
gps_pulse1sec_denoise
[
0
]
;
end
end
always
@
(
posedge
mclk
or
posedge
mrst
)
begin
// was negedge
// always @ (posedge mclk or posedge mrst) begin // was negedge
always
@
(
posedge
mclk
)
begin
// was negedge
we_d
<=
!
mrst
&&
cmd_we
&&
!
cmd_a
;
we_d
<=
!
mrst
&&
cmd_we
&&
!
cmd_a
;
we_imu
<=
!
mrst
&&
cmd_we
&&
!
cmd_a
&&
(
ctrl_addr
[
6
:
5
]
==
LOGGER_PAGE_IMU
)
;
we_imu
<=
!
mrst
&&
cmd_we
&&
!
cmd_a
&&
(
ctrl_addr
[
6
:
5
]
==
LOGGER_PAGE_IMU
)
;
we_gps
<=
!
mrst
&&
cmd_we
&&
!
cmd_a
&&
(
ctrl_addr
[
6
:
5
]
==
LOGGER_PAGE_GPS
)
;
we_gps
<=
!
mrst
&&
cmd_we
&&
!
cmd_a
&&
(
ctrl_addr
[
6
:
5
]
==
LOGGER_PAGE_GPS
)
;
...
...
logger/imu_exttime393.v
View file @
4713fc48
...
@@ -70,7 +70,7 @@ module imu_exttime393(
...
@@ -70,7 +70,7 @@ module imu_exttime393(
input
rd_stb
,
// data read strobe (increment address) - continuous 1'b1 until all the packet is read out
input
rd_stb
,
// data read strobe (increment address) - continuous 1'b1 until all the packet is read out
output
[
15
:
0
]
rdata
)
;
// data out (16 bits)
output
[
15
:
0
]
rdata
)
;
// data out (16 bits)
reg
[
4
:
0
]
raddr
;
reg
[
2
:
0
]
raddr
;
// 2 bits for the address, 1 - overflow
wire
en_mclk
=
|
en_chn_mclk
;
wire
en_mclk
=
|
en_chn_mclk
;
wire
[
3
:
0
]
ts_stb
=
{
ts_stb_chn3
,
ts_stb_chn2
,
ts_stb_chn1
,
ts_stb_chn0
};
wire
[
3
:
0
]
ts_stb
=
{
ts_stb_chn3
,
ts_stb_chn2
,
ts_stb_chn1
,
ts_stb_chn0
};
wire
[
3
:
0
]
ts_got
;
// timestamp transferred to the channel FIFO
wire
[
3
:
0
]
ts_got
;
// timestamp transferred to the channel FIFO
...
@@ -97,6 +97,7 @@ module imu_exttime393(
...
@@ -97,6 +97,7 @@ module imu_exttime393(
wire
[
7
:
0
]
copy_data
;
// data from the selected input fifos
wire
[
7
:
0
]
copy_data
;
// data from the selected input fifos
reg
[
7
:
0
]
copy_data_r
;
// low byte of the timestamp data being copied from one of the input FIFOs to the ts_ram
reg
[
7
:
0
]
copy_data_r
;
// low byte of the timestamp data being copied from one of the input FIFOs to the ts_ram
reg
rd_stb_mclk
;
reg
rd_stb_mclk
;
wire
xfer_done_mclk
;
// valiud information (4 words) are sent out, may start new arbitration
assign
chn_pri_w
=
{
in_full
[
3
]
&
~
(
|
in_full
[
2
:
0
])
,
assign
chn_pri_w
=
{
in_full
[
3
]
&
~
(
|
in_full
[
2
:
0
])
,
in_full
[
2
]
&
~
(
|
in_full
[
1
:
0
])
,
in_full
[
2
]
&
~
(
|
in_full
[
1
:
0
])
,
in_full
[
1
]
&
~
in_full
[
0
]
,
in_full
[
1
]
&
~
in_full
[
0
]
,
...
@@ -104,7 +105,8 @@ module imu_exttime393(
...
@@ -104,7 +105,8 @@ module imu_exttime393(
assign
chn_enc_w
=
{
chn_pri_w
[
3
]
|
chn_pri_w
[
2
]
,
assign
chn_enc_w
=
{
chn_pri_w
[
3
]
|
chn_pri_w
[
2
]
,
chn_pri_w
[
3
]
|
chn_pri_w
[
1
]
};
chn_pri_w
[
3
]
|
chn_pri_w
[
1
]
};
assign
pre_copy_w
=
(
|
in_full
)
&&
!
copy_selected
[
0
]
&&
!
ts_full
;
// assign pre_copy_w = (|in_full) && !copy_selected[0] && !ts_full;
assign
pre_copy_w
=
(
|
in_full
)
&&
!
copy_selected
[
0
]
&&
!
ts_full
&&
!
rd_stb_mclk
;
assign
copy_data
=
dout_chn
[
sel_chn
*
8
+:
8
]
;
// 4:1 mux
assign
copy_data
=
dout_chn
[
sel_chn
*
8
+:
8
]
;
// 4:1 mux
// acquire external timestamps @ mclk
// acquire external timestamps @ mclk
...
@@ -117,7 +119,8 @@ module imu_exttime393(
...
@@ -117,7 +119,8 @@ module imu_exttime393(
if
(
!
en_mclk
)
ts_full
<=
0
;
if
(
!
en_mclk
)
ts_full
<=
0
;
else
if
(
pre_copy_started
)
ts_full
<=
1
;
// turns on before in_full[*] - || will have no glitches
else
if
(
pre_copy_started
)
ts_full
<=
1
;
// turns on before in_full[*] - || will have no glitches
// else if (rd_start_mclk) ts_full <= 0;
// else if (rd_start_mclk) ts_full <= 0;
else
if
(
!
ts_pend
&&
!
rd_stb_mclk
)
ts_full
<=
0
;
// else if (!ts_pend && !rd_stb_mclk) ts_full <= 0;
else
if
(
xfer_done_mclk
)
ts_full
<=
0
;
if
(
!
en_mclk
)
ts_pend
<=
0
;
if
(
!
en_mclk
)
ts_pend
<=
0
;
else
if
(
pre_copy_started
)
ts_pend
<=
1
;
else
if
(
pre_copy_started
)
ts_pend
<=
1
;
...
@@ -149,8 +152,8 @@ module imu_exttime393(
...
@@ -149,8 +152,8 @@ module imu_exttime393(
en
<=
en_mclk
;
en
<=
en_mclk
;
rd_stb_r
<=
rd_stb
;
rd_stb_r
<=
rd_stb
;
rd_start
<=
en
&&
rd_stb
&&
!
rd_stb_r
;
rd_start
<=
en
&&
rd_stb
&&
!
rd_stb_r
;
if
(
!
en
||
ts
)
raddr
[
4
:
0
]
<=
5'h
0
;
if
(
!
en
||
ts
)
raddr
<=
0
;
else
if
(
rd_stb
)
raddr
[
4
:
0
]
<=
raddr
[
4
:
0
]
+
1
;
else
if
(
rd_stb
&&
!
raddr
[
2
])
raddr
<=
raddr
+
1
;
if
(
!
en
)
rdy
<=
1'b0
;
if
(
!
en
)
rdy
<=
1'b0
;
else
if
(
ts
)
rdy
<=
1'b1
;
// too early, but it will become ready in time, before the local timestamp
else
if
(
ts
)
rdy
<=
1'b1
;
// too early, but it will become ready in time, before the local timestamp
...
@@ -226,7 +229,8 @@ module imu_exttime393(
...
@@ -226,7 +229,8 @@ module imu_exttime393(
// pulse_cross_clock i_rd_start_mclk (.rst(xrst), .src_clk(xclk), .dst_clk(mclk), .in_pulse(rd_start), .out_pulse(rd_start_mclk),.busy());
// pulse_cross_clock i_rd_start_mclk (.rst(xrst), .src_clk(xclk), .dst_clk(mclk), .in_pulse(rd_start), .out_pulse(rd_start_mclk),.busy());
pulse_cross_clock
i_rd_start_mclk
(
.
rst
(
!
en
)
,
.
src_clk
(
xclk
)
,
.
dst_clk
(
mclk
)
,
.
in_pulse
(
rd_start
)
,
.
out_pulse
(
rd_start_mclk
)
,.
busy
())
;
pulse_cross_clock
i_rd_start_mclk
(
.
rst
(
!
en
)
,
.
src_clk
(
xclk
)
,
.
dst_clk
(
mclk
)
,
.
in_pulse
(
rd_start
)
,
.
out_pulse
(
rd_start_mclk
)
,.
busy
())
;
pulse_cross_clock
i_xfer_done_mclk
(
.
rst
(
!
en
)
,
.
src_clk
(
xclk
)
,
.
dst_clk
(
mclk
)
,
.
in_pulse
(
raddr
[
1
:
0
]
==
2'h3
)
,
.
out_pulse
(
xfer_done_mclk
)
,.
busy
())
;
//
// generate timestamp request as soon as one of the sub-channels starts copying. That time stamp will be stored for this (ext) channel
// generate timestamp request as soon as one of the sub-channels starts copying. That time stamp will be stored for this (ext) channel
// pulse_cross_clock i_ts (.rst(mrst), .src_clk(mclk), .dst_clk(xclk), .in_pulse(pre_copy_w), .out_pulse(ts),.busy());
// pulse_cross_clock i_ts (.rst(mrst), .src_clk(mclk), .dst_clk(xclk), .in_pulse(pre_copy_w), .out_pulse(ts),.busy());
pulse_cross_clock
i_ts
(
.
rst
(
en_chn_mclk
==
0
)
,
.
src_clk
(
mclk
)
,
.
dst_clk
(
xclk
)
,
.
in_pulse
(
pre_copy_w
)
,
.
out_pulse
(
ts
)
,.
busy
())
;
pulse_cross_clock
i_ts
(
.
rst
(
en_chn_mclk
==
0
)
,
.
src_clk
(
mclk
)
,
.
dst_clk
(
xclk
)
,
.
in_pulse
(
pre_copy_w
)
,
.
out_pulse
(
ts
)
,.
busy
())
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment