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
ecaf0e84
Commit
ecaf0e84
authored
Dec 11, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
synchronized with x393_sata, added irq on/off logging
parent
0f42a897
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
ahci_defaults.vh
includes/ahci_defaults.vh
+1
-1
ahci_localparams.vh
includes/ahci_localparams.vh
+1
-1
ahci_top.v
x393_sata/ahci/ahci_top.v
+13
-2
No files found.
includes/ahci_defaults.vh
View file @
ecaf0e84
...
...
@@ -2,6 +2,6 @@
, .INIT_08 (256'h000000000024000600000000000000000000000080000C000000000080000800)
, .INIT_09 (256'h000000000000000000000000000000000000000000000000FFFFFFFF00000000)
, .INIT_0B (256'h0000000000000000000000000000003300000000000000000000000000000000)
, .INIT_0C (256'h00000000000000000000000000000000000000000101001
1
001000000001FFFE)
, .INIT_0C (256'h00000000000000000000000000000000000000000101001
2
001000000001FFFE)
, .INIT_0D (256'h000001000000000000000040000000000001FFFE000000008000000000000000)
, .INIT_0E (256'h0000000000000000000000000000000000000000000000000000000040000001)
includes/ahci_localparams.vh
View file @
ecaf0e84
...
...
@@ -97,7 +97,7 @@
// RO: HBA Revision ID
localparam PCI_Header__RID__RID__ADDR = 'h62;
localparam PCI_Header__RID__RID__MASK = 'hff;
localparam PCI_Header__RID__RID__DFLT = 'h1
1
;
localparam PCI_Header__RID__RID__DFLT = 'h1
2
;
// RO: Base Class Code: 1 - Mass Storage Device
localparam PCI_Header__CC__BCC__ADDR = 'h62;
localparam PCI_Header__CC__BCC__MASK = 'hff000000;
...
...
x393_sata/ahci/ahci_top.v
View file @
ecaf0e84
...
...
@@ -1217,6 +1217,7 @@ wire [9:0] xmit_dbg_01;
.
d2h_ready
(
d2h_ready
)
,
// input
.
debug_link_send_data
(
debug_link_send_data
)
,
// input
.
debug_link_dmatp
(
debug_link_dmatp
)
,
// link received DMATp from device
.
irq
(
irq
)
,
// system IRQ
.
datascope_clk
(
datascope_clk
)
,
// output
.
datascope_waddr
(
datascope_waddr
)
,
// output[9:0] reg
.
datascope_we
(
datascope_we
)
,
// output
...
...
@@ -1350,6 +1351,7 @@ module datascope_timing #(
input
debug_link_send_data
,
// @posedge mclk (sata_clk, 75MHz) - last symbol was data output (to count sent out)
input
debug_link_dmatp
,
// link received DMATp from device
input
irq
,
// system irq
output
datascope_clk
,
output
reg
[
ADDRESS_BITS
-
1
:
0
]
datascope_waddr
,
output
datascope_we
,
...
...
@@ -1408,6 +1410,10 @@ module datascope_timing #(
reg
reset_link_count
;
// data FIS from dma command until
reg
was_link_dmatp
;
//
reg
irq_r
;
reg
irq_was
;
wire
we_w
=
write_punch_time
||
fis_start
||
(
fis_we
?
pre_we_r
:
(
!
fis_run
&&
(
fis_run_d
||
fis_run_d2
||
fis_run_d3
||
fis_run_d4
||
fis_run_d5
)))
;
// 3 after
wire
we_irq
=
(
irq_was
^
irq_r
)
&&
!
we_w
;
// only when not irq
// input debug_link_dmatp, // link received DMATp from device
...
...
@@ -1436,11 +1442,11 @@ module datascope_timing #(
else
if
(
!
fis_run_d2
&&
fis_run_d3
)
datascope_di
<=
{
8'h55
,
last_dma_cmd
};
else
if
(
!
fis_run_d3
&&
fis_run_d4
)
datascope_di
<=
non_dma_act
;
else
if
(
!
fis_run_d4
&&
fis_run_d5
)
datascope_di
<=
{
h2d_nready_cntr
[
7
:
0
]
,
was_link_dmatp
,
1'b0
,
link_count_latched
};
else
if
(
we_irq
)
datascope_di
<=
{
3'h7
,
irq_r
,
cur_time
};
pre_we_r
<=
pre_we_w
||
fis_start
;
// we_r <= write_punch_time || fis_start || (fis_we ? pre_we_r : (!fis_run && fis_run_d));
we_r
<=
w
rite_punch_time
||
fis_start
||
(
fis_we
?
pre_we_r
:
(
!
fis_run
&&
(
fis_run_d
||
fis_run_d2
||
fis_run_d3
||
fis_run_d4
||
fis_run_d5
)))
;
// 3 after
we_r
<=
w
e_w
||
we_irq
;
if
(
fis_start
)
fis_left
<=
FIS_LEN
-
1
;
else
if
(
pre_we_w
)
fis_left
<=
fis_left
-
1
;
...
...
@@ -1509,6 +1515,11 @@ module datascope_timing #(
if
(
rst
)
datascope_waddr
<=
0
;
else
if
(
we_r
)
datascope_waddr
<=
datascope_waddr
+
1
;
irq_r
<=
irq
;
if
(
rst
)
irq_was
<=
0
;
else
if
(
we_irq
)
irq_was
<=
irq_r
;
end
endmodule
...
...
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