Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393_sata
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_sata
Commits
9c36c48f
Commit
9c36c48f
authored
Feb 22, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging with the driver
parent
5cfb1ff4
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
421 additions
and
186 deletions
+421
-186
.project
.project
+17
-17
ahci_ctrl_stat.v
ahci/ahci_ctrl_stat.v
+61
-28
ahci_fsm.v
ahci/ahci_fsm.v
+3
-0
ahci_top.v
ahci/ahci_top.v
+51
-17
sata_ahci_top.v
ahci/sata_ahci_top.v
+3
-2
action_decoder.v
generated/action_decoder.v
+36
-34
condition_mux.v
generated/condition_mux.v
+1
-1
ahci_fsm_sequence.py
helpers/ahci_fsm_sequence.py
+5
-2
gtx_wrap.v
host/gtx_wrap.v
+3
-2
sata_phy.v
host/sata_phy.v
+1
-0
ahxi_fsm_code.vh
includes/ahxi_fsm_code.vh
+20
-20
x393sata.py
py393sata/x393sata.py
+6
-0
tb_ahci.tf
tb/tb_ahci.tf
+7
-3
tb_ahci_01.sav
tb_ahci_01.sav
+202
-56
GTXE2_GPL.v
wrapper/GTXE2_GPL.v
+5
-4
No files found.
.project
View file @
9c36c48f
...
...
@@ -52,87 +52,87 @@
<link>
<name>
vivado_logs/VivadoBitstream.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoBitstream-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoBitstream-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoOpt.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoOpt-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoOpt-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoOptPhys.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoOptPhys-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoOptPhys-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoOptPower.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoOptPower-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoOptPower-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoPlace.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoPlace-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoPlace-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoRoute.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoRoute-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoRoute-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoSynthesis.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoSynthesis-201602
17173227982
.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoSynthesis-201602
22133537458
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoTimimgSummaryReportImplemented.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimimgSummaryReportImplemented-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimimgSummaryReportImplemented-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoTimimgSummaryReportSynthesis.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimimgSummaryReportSynthesis-201602
17173227982
.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimimgSummaryReportSynthesis-201602
22133537458
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoTimingReportImplemented.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimingReportImplemented-201602
1717334142
4.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimingReportImplemented-201602
2213382398
4.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoTimingReportSynthesis.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimingReportSynthesis-201602
17173227982
.log
</location>
<location>
/home/andrey/git/x393_sata/vivado_logs/VivadoTimingReportSynthesis-201602
22133537458
.log
</location>
</link>
<link>
<name>
vivado_state/x393_sata-opt-phys.dcp
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-opt-phys-201602
1717334142
4.dcp
</location>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-opt-phys-201602
2213382398
4.dcp
</location>
</link>
<link>
<name>
vivado_state/x393_sata-opt-power.dcp
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-opt-power-201602
1717334142
4.dcp
</location>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-opt-power-201602
2213382398
4.dcp
</location>
</link>
<link>
<name>
vivado_state/x393_sata-opt.dcp
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-opt-201602
1717334142
4.dcp
</location>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-opt-201602
2213382398
4.dcp
</location>
</link>
<link>
<name>
vivado_state/x393_sata-place.dcp
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-place-201602
1717334142
4.dcp
</location>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-place-201602
2213382398
4.dcp
</location>
</link>
<link>
<name>
vivado_state/x393_sata-route.dcp
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-route-201602
1717334142
4.dcp
</location>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-route-201602
2213382398
4.dcp
</location>
</link>
<link>
<name>
vivado_state/x393_sata-synth.dcp
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-synth-201602
17173227982
.dcp
</location>
<location>
/home/andrey/git/x393_sata/vivado_state/x393_sata-synth-201602
22133537458
.dcp
</location>
</link>
</linkedResources>
</projectDescription>
ahci/ahci_ctrl_stat.v
View file @
9c36c48f
...
...
@@ -53,6 +53,7 @@ module ahci_ctrl_stat #(
input
update_serr
,
input
update_pcmd
,
input
update_pci
,
input
update_ghc
,
/// output reg st01_pending, // software turned PxCMD.ST from 0 to 1
/// output reg st10_pending, // software turned PxCMD.ST from 1 to 0
...
...
@@ -136,6 +137,8 @@ module ahci_ctrl_stat #(
input
pxci0_clear
,
// PxCI clear
output
pxci0
,
// pxCI current value
input
hba_reset_done
,
// at the end of the HBA reset, clear GHC.HR, GHC.IE
/*
*/
output
reg
irq
...
...
@@ -143,7 +146,7 @@ module ahci_ctrl_stat #(
)
;
`include
"includes/ahci_localparams.vh"
// @SuppressThisWarning VEditor : Unused localparams
wire
swr_GHC__IE
=
soft_write_en
&&
(
soft_write_addr
==
GHC__GHC__IE__ADDR
)
;
//
wire swr_GHC__IE = soft_write_en && (soft_write_addr == GHC__GHC__IE__ADDR);
wire
swr_GHC__IS
=
soft_write_en
&&
(
soft_write_addr
==
GHC__IS__IPS__ADDR
)
;
wire
swr_HBA_PORT__PxCMD
=
soft_write_en
&&
(
soft_write_addr
==
HBA_PORT__PxCMD__ST__ADDR
)
;
wire
swr_HBA_PORT__PxIS
=
soft_write_en
&&
(
soft_write_addr
==
HBA_PORT__PxIS__CPDS__ADDR
)
;
...
...
@@ -152,21 +155,25 @@ module ahci_ctrl_stat #(
// wire swr_HBA_PORT__PxSSTS = soft_write_en && (soft_write_addr == HBA_PORT__PxSSTS__SPD__ADDR);
wire
swr_HBA_PORT__PxSERR
=
soft_write_en
&&
(
soft_write_addr
==
HBA_PORT__PxSERR__DIAG__X__ADDR
)
;
wire
swr_HBA_PORT__PxCI
=
soft_write_en
&&
(
soft_write_addr
==
HBA_PORT__PxCI__CI__ADDR
)
;
wire
swr_GHC__GHC
=
soft_write_en
&&
(
soft_write_addr
==
GHC__GHC__HR__ADDR
)
;
reg
hba_rst_r
=
1
;
reg
rst_por
;
reg
rst_hba
;
// @SuppressThisWarning VEditor : Unused, maybe will be used later
reg
rst_port
;
// @SuppressThisWarning VEditor : Unused, maybe will be used later
reg
ghc_ie_r
;
//
reg ghc_ie_r;
reg
ghc_is_r
;
reg
set_ghc_is_r
;
// active next cycle after one of individual non-masked bits in PxIS is set
reg
cleared_ghc
;
// active next cycle after ghc[1:0] is cleared
reg
[
31
:
0
]
PxIE_r
;
// some bits will be unused by PxIS_MASK
reg
[
31
:
0
]
PxIS_r
;
// some bits will be unused by PxIS_MASK
reg
[
11
:
0
]
PxSSTS_r
;
reg
[
31
:
0
]
PxSERR_r
;
// Assuming it is not needed for HBA, just for the software
reg
[
31
:
0
]
PxCMD_r
;
reg
pxci0_r
;
reg
[
1
:
0
]
GHC_r
;
// only 2 bits are used here
wire
ghc_ie
=
GHC_r
[
1
]
;
// bit 1 of GHC__GHC
reg
cirq_PRC
;
// clear PRC bit when clearing PxSERR.DIAG.N
reg
cirq_PC
;
// clear PC bit when clearing PxSERR.DIAG.X
...
...
@@ -217,7 +224,7 @@ module ahci_ctrl_stat #(
(
{
4
{
ssts_det_dp
}}
&
4'h3
)
|
(
{
4
{
ssts_det_offline
}}
&
4'h4
)
;
// to update only H
AB
/async changed bits (not by the software)
// to update only H
BA
/async changed bits (not by the software)
wire
set_ssts_ipm
=
ssts_ipm_dnp
||
ssts_ipm_active
||
ssts_ipm_part
||
ssts_ipm_slumb
||
ssts_ipm_devsleep
;
wire
set_ssts_spd
=
ssts_spd_dnp
||
ssts_spd_gen1
||
ssts_spd_gen2
||
ssts_spd_gen3
;
...
...
@@ -230,19 +237,23 @@ module ahci_ctrl_stat #(
reg
sirq_changed
;
reg
pxcmd_changed
;
reg
ghc_is_changed
;
reg
ghc_ghc_changed
;
// wire [5:0] regs_changed={pxcmd_changed, serr_changed, ssts_changed, pxci_changed, sirq_changed,ghc_is_changed };
wire
[
5
:
0
]
regs_changed
={
pxci_changed
,
pxcmd_changed
,
serr_changed
,
ssts_changed
,
sirq_changed
,
ghc_is_changed
};
wire
[
6
:
0
]
regs_changed
={
ghc_ghc_changed
,
pxci_changed
,
pxcmd_changed
,
serr_changed
,
ssts_changed
,
sirq_changed
,
ghc_is_changed
};
// wire [5:0] update;
reg
[
5
:
1
]
updating
;
wire
[
5
:
0
]
update_first
=
{
6
{
update_all
}}
&
{
regs_changed
[
5
]
&&
~
(
|
regs_changed
[
4
:
0
])
,
reg
[
6
:
1
]
updating
;
wire
[
6
:
0
]
update_first
=
{
7
{
update_all
}}
&
{
regs_changed
[
6
]
&&
~
(
|
regs_changed
[
5
:
0
])
,
regs_changed
[
5
]
&&
~
(
|
regs_changed
[
4
:
0
])
,
regs_changed
[
4
]
&&
~
(
|
regs_changed
[
3
:
0
])
,
regs_changed
[
3
]
&&
~
(
|
regs_changed
[
2
:
0
])
,
regs_changed
[
2
]
&&
~
(
|
regs_changed
[
1
:
0
])
,
regs_changed
[
1
]
&&
~
regs_changed
[
0
]
,
regs_changed
[
0
]
};
wire
[
5
:
1
]
update_next
=
{
updating
[
5
]
&&
~
(
|
updating
[
4
:
1
])
,
wire
[
6
:
1
]
update_next
=
{
updating
[
6
]
&&
~
(
|
updating
[
5
:
1
])
,
updating
[
5
]
&&
~
(
|
updating
[
4
:
1
])
,
updating
[
4
]
&&
~
(
|
updating
[
3
:
1
])
,
updating
[
3
]
&&
~
(
|
updating
[
2
:
1
])
,
updating
[
2
]
&&
~
updating
[
1
]
,
...
...
@@ -255,10 +266,11 @@ module ahci_ctrl_stat #(
wire
update_HBA_PORT__PxSERR
=
update_serr
||
update_first
[
3
]
||
update_next
[
3
]
;
wire
update_HBA_PORT__PxCMD
=
update_pcmd
||
update_first
[
4
]
||
update_next
[
4
]
;
wire
update_HBA_PORT__PxCI
=
update_pci
||
update_first
[
5
]
||
update_next
[
5
]
;
wire
update_GHC_GHC
=
update_ghc
||
update_first
[
6
]
||
update_next
[
6
]
;
reg
pfsm_started_r
;
assign
update_busy
=
(
update_all
&&
(
|
regs_changed
))
||
(
|
updating
[
5
:
1
])
;
assign
update_busy
=
(
update_all
&&
(
|
regs_changed
))
||
(
|
updating
[
6
:
1
])
;
assign
update_pending
=
|
regs_changed
;
assign
pcmd_fre
=
|
(
HBA_PORT__PxCMD__FRE__MASK
&
PxCMD_r
)
;
assign
serr_diag_X
=
|
(
HBA_PORT__PxSERR__DIAG__X__MASK
&
PxSERR_r
)
;
...
...
@@ -372,7 +384,9 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
always
@
(
posedge
mclk
)
begin
if
(
mrst
)
irq
<=
0
;
else
irq
<=
ghc_ie_r
&&
ghc_is_r
;
// else irq <= ghc_ie_r && ghc_is_r;
else
irq
<=
ghc_ie
&&
ghc_is_r
;
end
// generate reset types
...
...
@@ -385,17 +399,16 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
end
// GHC_IE register (just one bit)
always
@
(
posedge
mclk
)
begin
if
(
rst_por
)
ghc_ie_r
<=
0
;
else
if
(
swr_GHC__IE
)
ghc_ie_r
<=
|
(
soft_write_data
&
GHC__GHC__IE__MASK
)
;
end
// always @(posedge mclk) begin
// if (rst_por) ghc_ie_r <= 0;
// else if (swr_GHC__IE) ghc_ie_r <= |(soft_write_data & GHC__GHC__IE__MASK);
// end
// swr_GHC__IS register (just one bit)
always
@
(
posedge
mclk
)
begin
if
(
mrst
)
ghc_is_r
<=
0
;
// any reset?
else
if
(
set_ghc_is_r
)
ghc_is_r
<=
1
;
else
if
(
swr_GHC__IS
)
ghc_is_r
<=
soft_write_data
[
0
]
;
if
(
mrst
||
hba_reset_done
)
ghc_is_r
<=
0
;
// any reset?
else
if
(
set_ghc_is_r
)
ghc_is_r
<=
1
;
else
if
(
swr_GHC__IS
)
ghc_is_r
<=
soft_write_data
[
0
]
;
end
// HBA_PORT__PxIE register
...
...
@@ -413,7 +426,17 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
always
@
(
posedge
mclk
)
begin
if
(
rst_por
)
set_ghc_is_r
<=
0
;
// TODO: Not exactly clear - when ghc_is_r should be set after being RWC? After setting some not masked new individual interrupt?
else
set_ghc_is_r
<=
|
(
sirq
&
PxIE_r
)
;
else
set_ghc_is_r
<=
|
(
sirq
&
PxIE_r
)
||
hba_reset_done
;
end
// GHC__GHC register
always
@
(
posedge
mclk
)
begin
if
(
rst_por
)
cleared_ghc
<=
0
;
else
cleared_ghc
<=
hba_reset_done
;
if
(
rst_por
)
GHC_r
<=
0
;
else
if
(
cleared_ghc
)
GHC_r
<=
0
;
else
if
(
swr_GHC__GHC
)
GHC_r
<=
soft_write_data
[
1
:
0
]
;
end
// HBA_PORT__PxSSTS register - updated from the HOST only
...
...
@@ -449,7 +472,7 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
else
if
(
swr_HBA_PORT__PxCI
)
pxci0_r
<=
soft_write_data
[
0
]
;
end
// HBA_PORT__PxCMD register - different behavio
u
s of differtnt fields
// HBA_PORT__PxCMD register - different behavio
r
s of differtnt fields
// use PxCMD_MASK to prevent generation of unneeded register bits
always
@
(
posedge
mclk
)
begin
...
...
@@ -469,8 +492,9 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
if
(
!
pfsm_started_r
)
pcmd_st_cleared
<=
0
;
// else if (swr_HBA_PORT__PxCMD) pcmd_st_cleared <= |(HBA_PORT__PxCMD__ST__MASK & PxCMD_r & ~soft_write_data);
else
pcmd_st_cleared
<=
swr_HBA_PORT__PxCMD
&&
(
|
(
HBA_PORT__PxCMD__ST__MASK
&
PxCMD_r
&
~
soft_write_data
))
;
end
// Update AXI registers with the current local data
always
@
(
posedge
mclk
)
begin
...
...
@@ -479,16 +503,18 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
(
{
ADDRESS_BITS
{
update_HBA_PORT__PxSSTS
}}
&
HBA_PORT__PxSSTS__SPD__ADDR
)
|
(
{
ADDRESS_BITS
{
update_HBA_PORT__PxSERR
}}
&
HBA_PORT__PxSERR__DIAG__X__ADDR
)
|
(
{
ADDRESS_BITS
{
update_HBA_PORT__PxCMD
}}
&
HBA_PORT__PxCMD__ICC__ADDR
)
|
(
{
ADDRESS_BITS
{
update_HBA_PORT__PxCI
}}
&
HBA_PORT__PxCI__CI__ADDR
)
;
(
{
ADDRESS_BITS
{
update_HBA_PORT__PxCI
}}
&
HBA_PORT__PxCI__CI__ADDR
)
|
(
{
ADDRESS_BITS
{
update_GHC_GHC
}}
&
GHC__GHC__AE__ADDR
)
;
//update_HBA_PORT__PxCI
regs_din
<=
(
{
32
{
update_GHC__IS
}}
&
{
31'b0
,
ghc_is_r
}
)
|
(
{
32
{
update_HBA_PORT__PxIS
}}
&
PxIS_r
)
|
(
{
32
{
update_HBA_PORT__PxSSTS
}}
&
{
20'b0
,
PxSSTS_r
[
11
:
0
]
}
)
|
(
{
32
{
update_HBA_PORT__PxSERR
}}
&
PxSERR_r
)
|
(
{
32
{
update_HBA_PORT__PxCMD
}}
&
PxCMD_r
)
|
(
{
32
{
update_HBA_PORT__PxCI
}}
&
{
31'b0
,
pxci0
}
)
;
regs_we
<=
update_GHC__IS
||
update_HBA_PORT__PxIS
||
update_HBA_PORT__PxSSTS
||
update_HBA_PORT__PxSERR
|
update_HBA_PORT__PxCMD
||
update_HBA_PORT__PxCI
;
(
{
32
{
update_HBA_PORT__PxCI
}}
&
{
31'b0
,
pxci0
}
)
|
(
{
32
{
update_GHC_GHC
}}
&
(
GHC__GHC__AE__DFLT
|
{
30'b0
,
GHC_r
}
))
;
regs_we
<=
update_GHC__IS
||
update_HBA_PORT__PxIS
||
update_HBA_PORT__PxSSTS
||
update_HBA_PORT__PxSERR
|
update_HBA_PORT__PxCMD
||
update_HBA_PORT__PxCI
||
update_GHC_GHC
;
// pending updates
if
(
mrst
)
pxci_changed
<=
1
;
//0;
...
...
@@ -515,10 +541,17 @@ localparam PxCMD_MASK = HBA_PORT__PxCMD__ICC__MASK | // 'hf0000000;
else
if
(
set_ghc_is_r
)
ghc_is_changed
<=
1
;
else
if
(
update_GHC__IS
)
ghc_is_changed
<=
0
;
if
(
mrst
)
ghc_ghc_changed
<=
1
;
//0;
else
if
(
set_ghc_is_r
)
ghc_ghc_changed
<=
1
;
else
if
(
update_GHC_GHC
)
ghc_ghc_changed
<=
0
;
// updating registers if needed, 0 to 6 cycles, in priority sequence
if
(
mrst
)
updating
[
5
:
1
]
<=
0
;
else
if
(
update_all
)
updating
[
5
:
1
]
<=
regs_changed
[
5
:
1
]
&
~
update_first
[
5
:
1
]
;
else
updating
[
5
:
1
]
<=
updating
[
5
:
1
]
&
~
update_next
[
5
:
1
]
;
if
(
mrst
)
updating
[
6
:
1
]
<=
0
;
else
if
(
update_all
)
updating
[
6
:
1
]
<=
regs_changed
[
6
:
1
]
&
~
update_first
[
6
:
1
]
;
else
updating
[
6
:
1
]
<=
updating
[
6
:
1
]
&
~
update_next
[
6
:
1
]
;
// detect software setting for PxCMD.ST 0->1 and 1->0
/*
...
...
ahci/ahci_fsm.v
View file @
9c36c48f
...
...
@@ -134,6 +134,8 @@ module ahci_fsm
input
sctl_det_changed
,
// Software had written new value to sctl_det
output
sctl_det_reset
,
// clear sctl_det_changed
output
hba_rst_done
,
// reset GHC.HR and other bits
output
pxci0_clear
,
// PxCI clear
input
pxci0
,
// pxCI current value
...
...
@@ -433,6 +435,7 @@ module ahci_fsm
.
PXSSTS_DET_1
(
ssts_det_dnp
)
,
// output reg
.
SSTS_DET_OFFLINE
(
ssts_det_offline
)
,
// output reg
.
SCTL_DET_CLEAR
(
sctl_det_reset
)
,
// output reg
.
HBA_RST_DONE
(
hba_rst_done
)
,
// output reg
// FIS RECEIVE
.
SET_UPDATE_SIG
(
set_update_sig
)
,
// output reg
.
UPDATE_SIG
(
update_sig
)
,
// output reg
...
...
ahci/ahci_top.v
View file @
9c36c48f
...
...
@@ -361,7 +361,7 @@ module ahci_top#(
/// wire sactive0; // bit 0 of sActive DWORD received in SDB FIS
// Using even word count (will be rounded up), partial DWORD (last) will be handled by PRD length if needed
wire
[
31
:
0
]
xfer_cntr
;
wire
[
31
:
2
]
xfer_cntr
;
wire
xfer_cntr_zero
;
/// wire [11:0] data_in_dwords; // number of DWORDs received in data FIS (can be updated internally). Is it needed?
...
...
@@ -420,7 +420,9 @@ module ahci_top#(
wire
pcmd_cr_set
;
// command list run set
wire
pcmd_cr_reset
;
// command list run reset
// wire pcmd_fr; // ahci_fis_receive:get_fis_busy - use frcv_busy
wire
pcmd_fre
;
// FIS enable copy to memory
wire
pcmd_fre0
;
// FIS enable copy to memory
wire
pcmd_fre
=
pcmd_fre0
||
1
;
// FIS enable copy to memory
// wire pcmd_clear_bsy_drq; // == ahci_fis_receive:clear_bsy_drq
wire
pcmd_clo
;
// RW1, causes ahci_fis_receive:clear_bsy_drq, that in turn resets this bit
// wire pcmd_clear_st; // RW clear ST (start) bit
...
...
@@ -472,6 +474,7 @@ module ahci_top#(
wire
pxci0_clear
;
// PxCI clear
wire
pxci0
;
// pxCI current value
wire
hba_rst_done
;
// HBA reset done - clear GHC.HR (and some other regs)
wire
[
9
:
0
]
last_jump_addr
;
wire
[
31
:
0
]
debug_dma
;
...
...
@@ -580,6 +583,7 @@ module ahci_top#(
.
sctl_det
(
sctl_det
)
,
// input[3:0]
.
sctl_det_changed
(
sctl_det_changed
)
,
// input
.
sctl_det_reset
(
sctl_det_reset
)
,
// output
.
hba_rst_done
(
hba_rst_done
)
,
// output
.
pxci0_clear
(
pxci0_clear
)
,
// output
.
pxci0
(
pxci0
)
,
// input
...
...
@@ -629,7 +633,7 @@ module ahci_top#(
.
decr_dwcr
(
frcv_decr_dwcr
)
,
// output increment pXferCntr after transmit by data transmitted)
.
decr_dwcw
(
frcv_decr_dwcw
)
,
// output increment pXferCntr after transmit by data transmitted)
// .decr_DXC_dw (data_out_dwords), // output[11:2] **** Probably not needed
.
pxcmd_fre
(
pcmd_fre
)
,
// input
.
pxcmd_fre
(
pcmd_fre
)
,
// input
.
pPioXfer
(
pPioXfer
)
,
// input
.
tfd_sts
(
tfd_sts
)
,
// input[7:0]
/// .tfd_err (tfd_err), // input[7:0]
...
...
@@ -731,7 +735,8 @@ wire[1:0] debug_get_fis_busy_r; // output[1:0]
.
was_port_rst
(
was_port_rst
)
,
// output
.
debug_in0
(
{
debug_data_in_ready
,
// output
debug_fis_end_w
,
// output
debug_fis_end_r
[
1
:
0
]
,
// output[1:0]
xfer_cntr_zero
,
debug_fis_end_r
[
0
]
,
// debug_fis_end_r[1:0], // output[1:0]
debug_get_fis_busy_r
[
1
:
0
]
,
// output[1:0]
debug_dma
[
25
:
0
]
}
)
,
// input[31:0]
// .debug_in1 ({xclk_period[7:0], // lower 8 bits of 12-bit value. Same frequency would be 0x800 (msb opposite to 3 next bits)
...
...
@@ -795,6 +800,7 @@ wire[1:0] debug_get_fis_busy_r; // output[1:0]
.
update_serr
(
1'b0
)
,
// update_HBA_PORT__PxSERR), // input
.
update_pcmd
(
1'b0
)
,
// update_HBA_PORT__PxCMD), // input
.
update_pci
(
1'b0
)
,
// update_HBA_PORT__PxCI), // input
.
update_ghc
(
1'b0
)
,
// update _GHC_GHC, // input
.
pcmd_clear_icc
(
1'b0
)
,
// pcmd_clear_icc), // input
.
pcmd_esp
(
pcmd_esp
)
,
// input
...
...
@@ -802,7 +808,7 @@ wire[1:0] debug_get_fis_busy_r; // output[1:0]
.
pcmd_cr_set
(
pcmd_cr_set
)
,
// input
.
pcmd_cr_reset
(
pcmd_cr_reset
)
,
// input
.
pcmd_fr
(
frcv_busy
)
,
// input
.
pcmd_fre
(
pcmd_fre
)
,
// output
.
pcmd_fre
(
pcmd_fre
0
)
,
// output
.
pcmd_clear_bsy_drq
(
frcv_clear_bsy_drq
)
,
// input
.
pcmd_clo
(
pcmd_clo
)
,
// output
.
pcmd_clear_st
(
1'b0
)
,
// pcmd_clear_st), // input
...
...
@@ -855,6 +861,7 @@ wire[1:0] debug_get_fis_busy_r; // output[1:0]
.
sctl_det_reset
(
sctl_det_reset
)
,
// input
.
pxci0_clear
(
pxci0_clear
)
,
// input
.
pxci0
(
pxci0
)
,
// output
.
hba_reset_done
(
hba_rst_done
)
,
// input
.
irq
(
irq
)
// output reg
)
;
...
...
@@ -1087,7 +1094,7 @@ wire [9:0] xmit_dbg_01;
)
;
// Datascope code
`define
DATASCOPE_V2
//
`define DATASCOPE_V2
// Datascope interface (write to memory that can be software-read)
`ifdef
USE_DATASCOPE
...
...
@@ -1171,13 +1178,13 @@ debug_dma_h2d
};
*/
`endif
// DATASCOPE_V2
`ifdef
DATASCOPE_V1
//
`endif // DATASCOPE_V2
`else
//
`ifdef DATASCOPE_V1
localparam
DATASCOPE_CFIS_START
=
0
;
localparam
DATASCOPE_INCOMING_POST
=
32
;
reg
[
ADDRESS_BITS
-
1
:
0
]
datascope_waddr_r
;
reg
[
ADDRESS_BITS
-
1
:
0
]
datascope_waddr_r
=
0
;
reg
[
1
:
0
]
datascope_run
;
reg
datascope_link_run
;
...
...
@@ -1192,8 +1199,25 @@ debug_dma_h2d
reg
[
2
:
0
]
datascope_incoming_run
;
reg
[
7
:
0
]
datascope_incoming_cntr
;
reg
datascope_receive_fis
;
reg
[
9
:
0
]
datascope_last_jump_addr
=
0
;
reg
[
1
:
0
]
datascope_new_jump
=
0
;
reg
[
15
:
0
]
datascope_jump_cntr
=
0
;
//last_jump_addr[9:0]
always
@
(
posedge
mclk
)
begin
if
(
mrst
)
datascope_new_jump
[
0
]
<=
0
;
else
datascope_new_jump
[
0
]
<=
datascope_last_jump_addr
!=
last_jump_addr
;
if
(
mrst
)
datascope_new_jump
[
1
]
<=
0
;
else
datascope_new_jump
[
1
]
<=
datascope_new_jump
[
0
]
;
if
(
mrst
)
datascope_last_jump_addr
<=
0
;
if
(
datascope_new_jump
)
datascope_last_jump_addr
<=
last_jump_addr
;
if
(
datascope_we
)
datascope_jump_cntr
<=
datascope_jump_cntr
+
1
;
if
(
mrst
)
datascope_receive_fis
<=
0
;
else
if
(
datascope_incoming_start
)
datascope_receive_fis
<=
1
;
else
if
(
frcv_get_dsfis
||
...
...
@@ -1224,15 +1248,21 @@ debug_dma_h2d
end
assign
datascope_clk
=
mclk
;
assign
datascope_waddr
=
datascope_waddr_r
;
// assign datascope_waddr = datascope_waddr_r;
assign
datascope_waddr
=
last_jump_addr
;
// assign datascope_we = (datascope_run[0] && h2d_valid && h2d_ready) || fsnd_done
|| d2h_ready || xmit_ok || xmit_err
;
// assign datascope_we = (datascope_run[0] && h2d_valid && h2d_ready) || fsnd_done
|| xmit_ok || xmit_err; /// || d2h_ready
;
// assign datascope_we = (datascope_run[0] && h2d_valid && h2d_ready) || d2h_ready || datascope_link_run;
assign
datascope_we
=
(
datascope_run
[
0
]
&&
h2d_valid
&&
h2d_ready
)
||
datascope_incoming_run
[
0
]
||
datascope_link_run
;
///
assign datascope_we = (datascope_run[0] && h2d_valid && h2d_ready) || datascope_incoming_run[0] || datascope_link_run;
//
assign
datascope_we
=
&
datascope_new_jump
;
// assign datascope_di = {14'h3fff,fsnd_pCmdToIssue, xfer_cntr_zero, datascope_jump_cntr};
assign
datascope_di
=
{
2'h3
,
fsnd_pCmdToIssue
,
xfer_cntr_zero
,
2'b0
,
last_jump_addr
[
9
:
0
]
,
datascope_jump_cntr
};
// assign datascope_di = d2h_ready? {d2h_type,
/*
assign datascope_di = datascope_incoming_run[0]? {d2h_type,
debug_in_link[26], // state idle
debug_in_link[4:0], // encoded state (1 cycle later)
...
...
@@ -1259,6 +1289,8 @@ debug_dma_h2d
debug_in_link[24], // fsnd_dx_err[1], //fsnd_dx_err[2:0],
debug_in_link[23],
datascope_id[2:0], {12-ADDRESS_BITS{1'b0}}, datascope_waddr_r});
*/
/*
assign debug_out[ 4: 0] = debug_states_encoded;
assign debug_out[7: 5] = {
...
...
@@ -1340,8 +1372,10 @@ assign debug_out[7: 5] = {
datascope_run
[
1
]
<=
datascope_run
[
0
]
;
if
(
fsnd_cfis_xmit
)
datascope_waddr_r
<=
DATASCOPE_CFIS_START
;
else
if
(
datascope_we
)
datascope_waddr_r
<=
datascope_waddr_r
+
1
;
/// if (fsnd_cfis_xmit) datascope_waddr_r <= DATASCOPE_CFIS_START;
/// if (mrst) datascope_waddr_r <= DATASCOPE_CFIS_START;
/// else
if
(
datascope_we
)
datascope_waddr_r
<=
datascope_waddr_r
+
1
;
if
(
mrst
)
datascope_id
<=
0
;
...
...
ahci/sata_ahci_top.v
View file @
9c36c48f
...
...
@@ -174,10 +174,11 @@
// wire sata_clk;
// wire sata_rst;
wire
hba_arst
;
// @SuppressThisWarning VEditor unused
wire
hba_arst
;
// @S
uppressThisWarning VEditor unused
wire
port_arst
;
// @SuppressThisWarning VEditor unused
wire
port_arst_any
;
wire
exrst
=
port_arst_any
;
// now both hba_arst and port_arst are the same?
// wire exrst = port_arst_any; // now both hba_arst and port_arst are the same?
wire
exrst
=
port_arst_any
||
hba_arst
;
// now both hba_arst and port_arst are the same (only difference in fsm)
...
...
generated/action_decoder.v
View file @
9c36c48f
/*******************************************************************************
* Module: action_decoder
* Date:2016-02-
16
* Date:2016-02-
20
* Author: auto-generated file, see ahci_fsm_sequence.py
* Description: Decode sequencer code to 1-hot actions
*******************************************************************************/
...
...
@@ -28,6 +28,7 @@ module action_decoder (
output
reg
PXSSTS_DET_1
,
output
reg
SSTS_DET_OFFLINE
,
output
reg
SCTL_DET_CLEAR
,
output
reg
HBA_RST_DONE
,
output
reg
SET_UPDATE_SIG
,
output
reg
UPDATE_SIG
,
output
reg
UPDATE_ERR_STS
,
...
...
@@ -80,38 +81,39 @@ module action_decoder (
PXSSTS_DET_1
<=
enable
&&
data
[
6
]
&&
data
[
1
]
;
SSTS_DET_OFFLINE
<=
enable
&&
data
[
7
]
&&
data
[
1
]
;
SCTL_DET_CLEAR
<=
enable
&&
data
[
8
]
&&
data
[
1
]
;
SET_UPDATE_SIG
<=
enable
&&
data
[
9
]
&&
data
[
1
]
;
UPDATE_SIG
<=
enable
&&
data
[
10
]
&&
data
[
1
]
;
UPDATE_ERR_STS
<=
enable
&&
data
[
3
]
&&
data
[
2
]
;
UPDATE_PIO
<=
enable
&&
data
[
4
]
&&
data
[
2
]
;
UPDATE_PRDBC
<=
enable
&&
data
[
5
]
&&
data
[
2
]
;
CLEAR_BSY_DRQ
<=
enable
&&
data
[
6
]
&&
data
[
2
]
;
CLEAR_BSY_SET_DRQ
<=
enable
&&
data
[
7
]
&&
data
[
2
]
;
SET_BSY
<=
enable
&&
data
[
8
]
&&
data
[
2
]
;
SET_STS_7F
<=
enable
&&
data
[
9
]
&&
data
[
2
]
;
SET_STS_80
<=
enable
&&
data
[
10
]
&&
data
[
2
]
;
XFER_CNTR_CLEAR
<=
enable
&&
data
[
4
]
&&
data
[
3
]
;
DECR_DWCR
<=
enable
&&
data
[
5
]
&&
data
[
3
]
;
DECR_DWCW
<=
enable
&&
data
[
6
]
&&
data
[
3
]
;
FIS_FIRST_FLUSH
<=
enable
&&
data
[
7
]
&&
data
[
3
]
;
CLEAR_CMD_TO_ISSUE
<=
enable
&&
data
[
8
]
&&
data
[
3
]
;
DMA_ABORT
<=
enable
&&
data
[
9
]
&&
data
[
3
]
;
DMA_PRD_IRQ_CLEAR
<=
enable
&&
data
[
10
]
&&
data
[
3
]
;
XMIT_COMRESET
<=
enable
&&
data
[
5
]
&&
data
[
4
]
;
SEND_SYNC_ESC
<=
enable
&&
data
[
6
]
&&
data
[
4
]
;
SET_OFFLINE
<=
enable
&&
data
[
7
]
&&
data
[
4
]
;
R_OK
<=
enable
&&
data
[
8
]
&&
data
[
4
]
;
R_ERR
<=
enable
&&
data
[
9
]
&&
data
[
4
]
;
FETCH_CMD
<=
enable
&&
data
[
10
]
&&
data
[
4
]
;
ATAPI_XMIT
<=
enable
&&
data
[
6
]
&&
data
[
5
]
;
CFIS_XMIT
<=
enable
&&
data
[
7
]
&&
data
[
5
]
;
DX_XMIT
<=
enable
&&
data
[
8
]
&&
data
[
5
]
;
GET_DATA_FIS
<=
enable
&&
data
[
9
]
&&
data
[
5
]
;
GET_DSFIS
<=
enable
&&
data
[
10
]
&&
data
[
5
]
;
GET_IGNORE
<=
enable
&&
data
[
7
]
&&
data
[
6
]
;
GET_PSFIS
<=
enable
&&
data
[
8
]
&&
data
[
6
]
;
GET_RFIS
<=
enable
&&
data
[
9
]
&&
data
[
6
]
;
GET_SDBFIS
<=
enable
&&
data
[
10
]
&&
data
[
6
]
;
GET_UFIS
<=
enable
&&
data
[
8
]
&&
data
[
7
]
;
HBA_RST_DONE
<=
enable
&&
data
[
9
]
&&
data
[
1
]
;
SET_UPDATE_SIG
<=
enable
&&
data
[
10
]
&&
data
[
1
]
;
UPDATE_SIG
<=
enable
&&
data
[
3
]
&&
data
[
2
]
;
UPDATE_ERR_STS
<=
enable
&&
data
[
4
]
&&
data
[
2
]
;
UPDATE_PIO
<=
enable
&&
data
[
5
]
&&
data
[
2
]
;
UPDATE_PRDBC
<=
enable
&&
data
[
6
]
&&
data
[
2
]
;
CLEAR_BSY_DRQ
<=
enable
&&
data
[
7
]
&&
data
[
2
]
;
CLEAR_BSY_SET_DRQ
<=
enable
&&
data
[
8
]
&&
data
[
2
]
;
SET_BSY
<=
enable
&&
data
[
9
]
&&
data
[
2
]
;
SET_STS_7F
<=
enable
&&
data
[
10
]
&&
data
[
2
]
;
SET_STS_80
<=
enable
&&
data
[
4
]
&&
data
[
3
]
;
XFER_CNTR_CLEAR
<=
enable
&&
data
[
5
]
&&
data
[
3
]
;
DECR_DWCR
<=
enable
&&
data
[
6
]
&&
data
[
3
]
;
DECR_DWCW
<=
enable
&&
data
[
7
]
&&
data
[
3
]
;
FIS_FIRST_FLUSH
<=
enable
&&
data
[
8
]
&&
data
[
3
]
;
CLEAR_CMD_TO_ISSUE
<=
enable
&&
data
[
9
]
&&
data
[
3
]
;
DMA_ABORT
<=
enable
&&
data
[
10
]
&&
data
[
3
]
;
DMA_PRD_IRQ_CLEAR
<=
enable
&&
data
[
5
]
&&
data
[
4
]
;
XMIT_COMRESET
<=
enable
&&
data
[
6
]
&&
data
[
4
]
;
SEND_SYNC_ESC
<=
enable
&&
data
[
7
]
&&
data
[
4
]
;
SET_OFFLINE
<=
enable
&&
data
[
8
]
&&
data
[
4
]
;
R_OK
<=
enable
&&
data
[
9
]
&&
data
[
4
]
;
R_ERR
<=
enable
&&
data
[
10
]
&&
data
[
4
]
;
FETCH_CMD
<=
enable
&&
data
[
6
]
&&
data
[
5
]
;
ATAPI_XMIT
<=
enable
&&
data
[
7
]
&&
data
[
5
]
;
CFIS_XMIT
<=
enable
&&
data
[
8
]
&&
data
[
5
]
;
DX_XMIT
<=
enable
&&
data
[
9
]
&&
data
[
5
]
;
GET_DATA_FIS
<=
enable
&&
data
[
10
]
&&
data
[
5
]
;
GET_DSFIS
<=
enable
&&
data
[
7
]
&&
data
[
6
]
;
GET_IGNORE
<=
enable
&&
data
[
8
]
&&
data
[
6
]
;
GET_PSFIS
<=
enable
&&
data
[
9
]
&&
data
[
6
]
;
GET_RFIS
<=
enable
&&
data
[
10
]
&&
data
[
6
]
;
GET_SDBFIS
<=
enable
&&
data
[
8
]
&&
data
[
7
]
;
GET_UFIS
<=
enable
&&
data
[
9
]
&&
data
[
7
]
;
end
endmodule
generated/condition_mux.v
View file @
9c36c48f
/*******************************************************************************
* Module: condition_mux
* Date:2016-02-
16
* Date:2016-02-
20
* Author: auto-generated file, see ahci_fsm_sequence.py
* Description: Select condition
*******************************************************************************/
...
...
helpers/ahci_fsm_sequence.py
View file @
9c36c48f
...
...
@@ -47,6 +47,7 @@ actions = ['NOP',
# CTRL_STAT
'PXSERR_DIAG_X'
,
'SIRQ_DHR'
,
'SIRQ_DP'
,
'SIRQ_DS'
,
'SIRQ_IF'
,
'SIRQ_INF'
,
'SIRQ_PS'
,
'SIRQ_SDB'
,
'SIRQ_TFE'
,
'SIRQ_UF'
,
'PFSM_STARTED'
,
'PCMD_CR_CLEAR'
,
'PCMD_CR_SET'
,
'PXCI0_CLEAR'
,
'PXSSTS_DET_1'
,
'SSTS_DET_OFFLINE'
,
'SCTL_DET_CLEAR'
,
'HBA_RST_DONE'
,
# FIS RECEIVE
'SET_UPDATE_SIG'
,
'UPDATE_SIG'
,
'UPDATE_ERR_STS'
,
'UPDATE_PIO'
,
'UPDATE_PRDBC'
,
'CLEAR_BSY_DRQ'
,
'CLEAR_BSY_SET_DRQ'
,
'SET_BSY'
,
'SET_STS_7F'
,
'SET_STS_80'
,
'XFER_CNTR_CLEAR'
,
'DECR_DWCR'
,
'DECR_DWCW'
,
'FIS_FIRST_FLUSH'
,
...
...
@@ -83,7 +84,7 @@ conditions = [
sequence
=
[{
LBL
:
'POR'
,
ADDR
:
0x0
,
ACT
:
NOP
},
{
GOTO
:
'H:Init'
},
{
LBL
:
'HBA_RST'
,
ADDR
:
0x2
,
ACT
:
NOP
},
{
GOTO
:
'H:
Init
'
},
{
GOTO
:
'H:
HBA_RST
'
},
{
LBL
:
'PORT_RST'
,
ADDR
:
0x4
,
ACT
:
NOP
},
{
GOTO
:
'H:Init'
},
...
...
@@ -94,7 +95,9 @@ sequence = [{LBL:'POR', ADDR: 0x0, ACT: NOP},
{
LBL
:
'ST_CLEARED'
,
ADDR
:
0x8
,
ACT
:
NOP
},
# TODO: make sure this jump is not from P:Init
{
GOTO
:
'P:StartBitCleared'
},
{
LBL
:
'H:HBA_RST'
,
ACT
:
'HBA_RST_DONE'
},
# Reset GHC.HR and other things
{
GOTO
:
'H:Init'
},
{
LBL
:
'H:Init'
,
ACT
:
NOP
},
{
GOTO
:
'H:WaitForAhciEnable'
},
...
...
host/gtx_wrap.v
View file @
9c36c48f
...
...
@@ -88,6 +88,7 @@ module gtx_wrap #(
output
wire
txresetdone
,
input
wire
txcominit
,
input
wire
txcomwake
,
output
wire
txcomfinish
,
// @txusrclk2
// elastic buffer status
output
wire
rxelsfull
,
output
wire
rxelsempty
,
...
...
@@ -207,7 +208,7 @@ if (DATA_BYTE_WIDTH == 4) begin
reg
[
1
:
0
]
txcharisk_enc_in_r
;
// TODO: remove async reset
wire
[
38
:
0
]
txdata_resync_out
;
wire
txdata_resync_valid
;
reg
[
1
:
0
]
txcomwake_gtx_f
;
// 2 registers just to match latency (data to the 3 next) in Alexey's code, prob
ba
ly not needed
reg
[
1
:
0
]
txcomwake_gtx_f
;
// 2 registers just to match latency (data to the 3 next) in Alexey's code, prob
ab
ly not needed
reg
[
1
:
0
]
txcominit_gtx_f
;
reg
[
1
:
0
]
txelecidle_gtx_f
;
...
...
@@ -1261,7 +1262,7 @@ gtxe2_channel_wrapper(
.
TXPCSRESET
(
txpcsreset
)
,
.
TXPMARESET
(
1'b0
)
,
.
TXRESETDONE
(
txresetdone_gtx
)
,
.
TXCOMFINISH
()
,
.
TXCOMFINISH
(
txcomfinish
)
,
.
TXCOMINIT
(
txcominit_gtx
)
,
.
TXCOMSAS
(
1'b0
)
,
.
TXCOMWAKE
(
txcomwake_gtx
)
,
...
...
host/sata_phy.v
View file @
9c36c48f
...
...
@@ -531,6 +531,7 @@ gtx_wrap
.
txresetdone
(
txresetdone
)
,
// output wire
.
txcominit
(
txcominit
)
,
// input wire
.
txcomwake
(
txcomwake
)
,
// input wire
.
txcomfinish
()
,
// output wire
.
rxelsfull
(
rxelsfull
)
,
// output wire
.
rxelsempty
(
rxelsempty
)
,
// output wire
.
txdata
(
txdata
)
,
// input [31:0] wire
...
...
includes/ahxi_fsm_code.vh
View file @
9c36c48f
, .INIT_00 (256'h00100000000E0000000C0
0000033000000200000000A0000000A0000000A
0000)
, .INIT_01 (256'h
001944521C399446543044170000001900880019003002020204008400220006
)
, .INIT_02 (256'h001
900050019C82E000C04020110002924FB2503024000190003004204040000
)
, .INIT_03 (256'h
845284BE44374C682C4214190012003900880018000A02080022001901020090
)
, .INIT_04 (256'h00
190110003901100019144601020030020202040039B07D707A041000398C6B
)
, .INIT_05 (256'h
64540C2504580000004E24FB250300C0004C24FB250300C0005C00000039000
0)
, .INIT_06 (256'h
D10550F8903900A00104006B0202005000E2A89368F018E918CB98A758D73882
)
, .INIT_07 (256'h00
60003900000039B07D00000050004400220039B07D707A307730F001080071
)
, .INIT_08 (256'h
00050091C88F002200240091288B28FF000C0110008624FB25030240009CD0FD
)
, .INIT_09 (256'h
48A528A128FF00140039487F0CAD28FF0110009724FB25030140005004020091
)
, .INIT_0A (256'h
8839089C040800AD011000AB24FB250300C000500081005048A5002200240039
)
, .INIT_0B (256'h00
C004080039889C040800090039889C50BA0024004800B5D0FD50F8012000B1
)
, .INIT_0C (256'h
011000CF24FB250304200039889C50BA00240028011000C5C50324FB24FB022
0)
, .INIT_0D (256'h
0050C8E028FF000C011000DB24FB25030440003934D2000000D4001100D4C8D2
)
, .INIT_0E (256'h0
0F60082011000ED24FB250300C000390401011000E624FB2503018000500101
)
, .INIT_0F (256'h0
2010101002100FD021001010021004400F6000000F6011000F424FB250300C0
)
, .INIT_10 (256'h000000000000000000000000000000
0000000039004101050210010100000101
)
, .INITP_00 (256'h
C8220098170902401E272722222800309418810820809C8020188800
22222222)
, .INITP_01 (256'h888
82227209C82720A09C22089C680272181A01CB889C8605A2A89C882068270
)
, .INITP_02 (256'h000000000000000000000000000000000000000000000000000000000000
0
888)
, .INIT_00 (256'h00100000000E0000000C0
2020035000000220000000C0000000A0000000C
0000)
, .INIT_01 (256'h
1C3B9448543244190000001B0108001B00500402040401040022000600120000
)
, .INIT_02 (256'h001
BC8300014000C0210002B24FD25050440001B0003004200180000001B4454
)
, .INIT_03 (256'h
44394C6A2C44141B0012003B01080028000A04080022001B01020110001B0005
)
, .INIT_04 (256'h00
3B0210001B14480102005004020404003BB07F707C0060003B8C6D845484C0
)
, .INIT_05 (256'h
045A0000005024FD25050140004E24FD25050140005E0000003B0000001B021
0)
, .INIT_06 (256'h
903B01200204006D0402009000E4A89568F218EB18CD98A958D9388464560C27
)
, .INIT_07 (256'h00
00003BB07F0000005200840022003BB07F707C307930F202080073D10750FA
)
, .INIT_08 (256'h
C891002200440093288D290100140210008824FD25050440009ED0FF00A0003B
)
, .INIT_09 (256'h
29010024003B48810CAF29010210009924FD250502400052000C009300050093
)
, .INIT_0A (256'h
003000AF021000AD24FD2505014000520081005248A700220044003B48A728A3
)
, .INIT_0B (256'h00
3B889E00300009003B889E50BC0044008800B7D0FF50FA022000B3883B089E
)
, .INIT_0C (256'h
24FD250500C0003B889E50BC00440048021000C7C50524FD24FD042000C2003
0)
, .INIT_0D (256'h
29010014021000DD24FD25050180003B34D4000000D6001100D6C8D4021000D1
)
, .INIT_0E (256'h0
21000EF24FD25050140003B0401021000E824FD25050280005201010052C8E2
)
, .INIT_0F (256'h0
02100FF041001030021008400F8000000F8021000F624FD2505014000F80082
)
, .INIT_10 (256'h000000000000000000000000000000
3B00410107041001030000010302010103
)
, .INITP_00 (256'h
8220098170902401E272722222800309418810820809C80201888002
22222222)
, .INITP_01 (256'h888
2227209C82720A09C22089C680272181A01CB889C8605A2A89C882068270C
)
, .INITP_02 (256'h000000000000000000000000000000000000000000000000000000000000
8
888)
py393sata/x393sata.py
View file @
9c36c48f
...
...
@@ -1080,6 +1080,12 @@ sata.reg_status()
_=mem.mem_dump (0x80000ff0, 4,4)
sata.reg_status(),sata.reset_ie(),sata.err_count()
_=mem.mem_dump (0x80000ff0, 4,4)
_=mem.mem_dump (0x80001000, 0x120,4)
for block in range (1,1024):
print("
\n
======== Reading block
%
d ==============="
%
block)
sata.arm_logger()
...
...
tb/tb_ahci.tf
View file @
9c36c48f
...
...
@@ -416,7 +416,7 @@ top dut(
assign
device_rst
=
dut
.
axi_rst
;
sata_device
dev
(
.
rst
(
device_rst
),
.
rst
(
1
'b1), // FOREVER
device_rst),
.RXN (txn),
.RXP (txp),
.TXN (rxn),
...
...
@@ -1284,7 +1284,11 @@ initial begin //Host
maxigp1_print ('h1014,"DATASCOPE 5"); //
maxigp1_print ('h1018,"DATASCOPE 6"); //
maxigp1_print ('h101c,"DATASCOPE 7"); //
// Reset HBA
maxigp1_writep (GHC__GHC__HR__ADDR << 2, 1); // Reset HBA
#12000;
@(posedge CLK);
maxigp1_print (GHC__GHC__HR__ADDR << 2,"GHC__GHC__HR__ADDR after pause");
/*
// Reset port
maxigp1_print ('h3ff << 2,"DEBUG_REGISTER");
...
...
@@ -1394,7 +1398,7 @@ end
initial begin
// #30000;
#
7
0000;
#
10
0000;
// #29630;
// #30000;
// #250000;
...
...
tb_ahci_01.sav
View file @
9c36c48f
[*]
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*]
Thu Feb 18 00:25:28
2016
[*]
Mon Feb 22 22:05:23
2016
[*]
[dumpfile] "/home/andrey/git/x393_sata/simulation/tb_ahci-201602
17160046559
.fst"
[dumpfile_mtime] "
Wed Feb 17 23:02:18
2016"
[dumpfile_size] 1
0746491
[dumpfile] "/home/andrey/git/x393_sata/simulation/tb_ahci-201602
22132932478
.fst"
[dumpfile_mtime] "
Mon Feb 22 20:31:27
2016"
[dumpfile_size] 1
4406416
[savefile] "/home/andrey/git/x393_sata/tb_ahci_01.sav"
[timestart] 4
97596
00
[timestart] 4
86300
00
[size] 1823 1180
[pos] 2026 0
*-
14.446142 49823334 29549854 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-
23.135801 73732102 62346574 72998842 74025406
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] tb_ahci.
[treeopen] tb_ahci.axi_read_addr.
[treeopen] tb_ahci.dev.linkMonitorFIS.
...
...
@@ -28,9 +28,9 @@
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.link.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.link.crc.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.link.scrambler.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.genblk1.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.channel.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.channel.rx.
...
...
@@ -38,6 +38,7 @@
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.channel.tx.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.sipo_to_xclk_measure_i.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.
[treeopen] tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.
[treeopen] tb_ahci.dut.sata_top.ahci_top_i.
[treeopen] tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.
[treeopen] tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.
...
...
@@ -59,8 +60,8 @@
[treeopen] tb_ahci.simul_axi_hp_wr_i.waddr_i.
[treeopen] tb_ahci.simul_axi_hp_wr_i.wdata_i.
[treeopen] tb_ahci.simul_axi_read_i.
[sst_width]
296
[signals_width] 3
41
[sst_width]
368
[signals_width] 3
22
[sst_expanded] 1
[sst_vpaned_height] 573
@820
...
...
@@ -777,10 +778,8 @@ tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.bram_addr[9:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.aclk
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.axibram_read_i.dev_ready
@c00200
-tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.bram_raddr
@1401200
-group_end
@22
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.axibram_read_i.bram_raddr[11:0]
@800028
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.bram_ren[1:0]
@28
...
...
@@ -791,6 +790,9 @@ tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.bram_ren[1:0]
@22
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.bram_rdata_r[31:0]
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.axibram_read_i.bram_rdata[31:0]
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_reset_cntr[8:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_rst_r
@200
-
@28
...
...
@@ -1241,28 +1243,9 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.serr[31:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.pxci0_clear
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.pxci_changed
@c00022
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
(2)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
(3)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
(4)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
(5)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[5:0]
@1401200
-group_end
@c00022
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
(2)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
(3)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
(4)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
(5)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[5:0]
@1401200
-group_end
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.regs_changed[6:0]
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
@200
-
@22
...
...
@@ -1381,6 +1364,8 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.PxIS_r[31:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.pxci0_clear
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.swr_HBA_PORT__PxCI
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.swr_HBA_PORT__PxCMD
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.swr_GHC__GHC
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.pxci0
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.pxci_changed
@c00022
...
...
@@ -1465,10 +1450,11 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.soft_write_data[31:0]
-group_end
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.set_ghc_is_r
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.ghc_ie_r
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.ghc_is_r
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.sirq_changed
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.irq
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.GHC_r[1:0]
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_GHC_GHC
@c00200
-ssts
@c00022
...
...
@@ -1603,6 +1589,13 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_g
@c00200
-ahci_fsm
@28
tb_ahci.dut.sata_top.ahci_top_i.hba_arst
tb_ahci.dut.sata_top.ahci_top_i.hba_rst_done
tb_ahci.dut.sata_top.ahci_top_i.was_port_rst
tb_ahci.dut.sata_top.ahci_top_i.was_hba_rst
@200
-
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_fsm_i.dma_abort_done
tb_ahci.dut.sata_top.ahci_top_i.ahci_fsm_i.pcmd_st_cleared
tb_ahci.dut.sata_top.ahci_top_i.ahci_fsm_i.asynq_rq
...
...
@@ -1969,7 +1962,7 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_receive_i.fis_dcount[3:0]
-group_end
@1401200
-ahci_fis_receive
@
8
00200
@
c
00200
-ahci_fis_transmit
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.xmit_ok
...
...
@@ -2034,6 +2027,97 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.todev_valid
@1000200
-todev
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.acfis_xmit_busy_r
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.ct_re_w
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.cfis_acmd_left_r[4:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.cfis_xmit
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.ch_cmd_len_r[4:0]
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.fetch_chead_stb_r[3:0]
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.reg_addr[9:0]
@c00028
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.reg_re[1:0]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.reg_re[1:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.reg_re[1:0]
@1401200
-group_end
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.reg_rdata[31:0]
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.ct_addr[4:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.ct_re[1:0]
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.ct_data[31:0]
tb_ahci.setup_pio_read_identify_command_simple.data_len
tb_ahci.setup_pio_read_identify_command_simple.i
tb_ahci.setup_pio_read_identify_command_simple.prd_int
@28
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_we
@c00022
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(2)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(3)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(4)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(5)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(6)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(7)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(8)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
(9)tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_addr[9:0]
@1401200
-group_end
@22
tb_ahci.dut.sata_top.ahci_top_i.axi_ahci_regs_i.hba_dout[31:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.regs_we_freceive
tb_ahci.dut.sata_top.ahci_top_i.regs_re_ftransmit[1:0]
tb_ahci.dut.sata_top.ahci_top_i.regs_we_acs
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_busy
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_pending
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_GHC_GHC
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_GHC__IS
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_ghc
@800022
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
(2)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
(3)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
(4)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
(5)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
(6)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_first[6:0]
@1001200
-group_end
@800022
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
(1)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
(2)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
(3)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
(4)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
(5)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.update_next[6:1]
@800022
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
(1)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
(2)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
(3)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
(4)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
(5)tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.updating[6:1]
@1001200
-group_end
-group_end
@200
-
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.write_or_w
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.todev_full_r
tb_ahci.dut.sata_top.ahci_top_i.ahci_fis_transmit_i.hba_rst
...
...
@@ -2129,7 +2213,7 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.prd_rd
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.data_addr[31:1]
@1001200
-group_end
@1
000
200
@1
401
200
-ahci_fis_transmit
@c00200
-ahci_sata_layers
...
...
@@ -2327,7 +2411,7 @@ tb_ahci.simul_axi_hp_wr_i.wdata_i.fill[7:0]
-fifo_wdata
@1401200
-simul_axi_hp_wr
@
8
00200
@
c
00200
-ahci_dma
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.addr_data_rq_w
...
...
@@ -2658,9 +2742,8 @@ tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.prd_rd
-
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.ahci_dma_rd_fifo_i.start
@23
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.ahci_dma_rd_fifo_i.wcnt[20:0]
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.ahci_dma_rd_fifo_i.wcnt[20:0]
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.ahci_dma_rd_fifo_i.last_mask[3:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.ahci_dma_i.ahci_dma_rd_fifo_i.last_fifo_wr
...
...
@@ -3508,7 +3591,7 @@ tb_ahci.simul_axi_hp_rd_i.rdata_i.out_full
-top
@200
-
@1
000
200
@1
401
200
-ahci_dma
@c00200
-datascope0
...
...
@@ -3557,7 +3640,7 @@ tb_ahci.dut.sata_top.ahci_top_i.datascope_di[31:0]
-
@1401200
-datascope0
@
8
00200
@
c
00200
-link
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.link.scrambler.rst
...
...
@@ -4056,9 +4139,9 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.link.alignes_pair
tb_ahci.dut.sata_top.ahci_sata_layers_i.link.frame_req
tb_ahci.dut.sata_top.ahci_sata_layers_i.link.frame_ack
tb_ahci.dut.sata_top.ahci_sata_layers_i.link.frame_busy
@1
000
200
@1
401
200
-link
@c0020
0
@c0020
1
-phy
@800200
-gtx_8x10enc
...
...
@@ -4226,6 +4309,7 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_g
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.channel.rx.dataiface.wordcounter[31:0]
@1401200
-GTXE2_GPL
@1401201
-phy
@c00200
-comma
...
...
@@ -4435,7 +4519,46 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtx_comma_align.shifted_win
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtx_comma_align.window[38:0]
@1401200
-comma_align
@c00200
@800200
-debug_cominit
@200
-
@22
tb_ahci.dut.sata_top.ahci_top_i.ahci_ctrl_stat_i.PxSSTS_r[11:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.cominit_got
tb_ahci.dut.sata_top.ahci_top_i.comreset_send
@1000200
-debug_cominit
@800200
-debug_hba_reset
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.reset
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.RXOOBRESET
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.GTRXRESET
@200
-
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.clk_reset
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.gtxe2_channel_wrapper.gtx_gpl.RXRESETDONE
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.rxuserrdy
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.rxreset
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.txresetdone
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.rxresetdone
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.txuserrdy
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_ready
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.sata_reset_done
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.rxeyereset_done
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.rxreset
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.txpmareset_done
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.usrpll_locked
@200
-
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.rxresetdone_gtx
@1000200
-debug_hba_reset
@800200
-oob_ctrl
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.gtx_ready
...
...
@@ -4443,11 +4566,15 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.rxcominitdet_in
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.rxcominitdet
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.rxcominit_done
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.rxcominitdet_l
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.gtx_ready
@200
-
@800200
-oob
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.txelecidle
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.txcominit
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.txcomwake
@800200
-states
@28
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.oob_ctrl.oob.state_idle
...
...
@@ -4472,15 +4599,10 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.phy_ready
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.dbg_clk_align_cntr[15:0]
@1000200
-states
@c00200
-tb_ahci.dut.sata_top.ahci_sata_layers_i.debug_sata
@1401200
-group_end
@200
-
@1000200
-oob
@1401200
-oob_ctrl
@c00200
-sipo_meas
...
...
@@ -4570,8 +4692,9 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.txreset
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.rxreset
@1401200
-sipo_meas
@
c
00200
@
8
00200
-gtx
@c00200
-elastic
@22
tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.elastic1632_i.dbg_di[31:0]
...
...
@@ -4694,6 +4817,7 @@ tb_ahci.dut.sata_top.ahci_sata_layers_i.phy.gtx_wrap.txdata_enc_out[19:0]
-
@1401200
-gtx8x10enc
@1000200
-gtx
@c00200
-device
...
...
@@ -4748,7 +4872,7 @@ tb_ahci.dev.phy.gtx_wrapper.gtx_gpl.channel.tx.TXN
tb_ahci.dev.linkSendPrim.type[111:0]
@1401200
-device
@
c
00200
@
8
00200
-datascope
@200
-
...
...
@@ -4836,13 +4960,35 @@ tb_ahci.dut.sata_top.ahci_top_i.datascope_di[31:0]
(31)tb_ahci.dut.sata_top.ahci_top_i.datascope_di[31:0]
@1401200
-group_end
@22
@
8000
22
tb_ahci.dut.sata_top.ahci_top_i.datascope_run[1:0]
@28
(0)tb_ahci.dut.sata_top.ahci_top_i.datascope_run[1:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.datascope_run[1:0]
@1001200
-group_end
@22
tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr[9:0]
@c00022
tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
@28
tb_ahci.dut.sata_top.ahci_top_i.datascope_we
(0)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(1)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(2)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(3)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(4)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(5)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(6)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(7)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(8)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
(9)tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr_r[9:0]
@1401200
-group_end
@28
tb_ahci.dut.sata_top.ahci_top_i.datascope_we
@22
tb_ahci.dut.sata_top.ahci_top_i.datascope_waddr[9:0]
@1000200
-datascope
@c00200
-frequency_meter
...
...
wrapper/GTXE2_GPL.v
View file @
9c36c48f
...
...
@@ -3005,21 +3005,22 @@ always @ (posedge DRPCLK) begin
if
(
DRPEN
)
drp_raddr
<=
DRPADDR
;
end
wire
reset_or_GTRXRESET
=
reset
||
GTRXRESET
;
initial
forever
@
(
posedge
reset
)
forever
@
(
posedge
reset
_or_GTRXRESET
)
begin
tx_rst_done
<=
1'b0
;
@
(
negedge
reset
)
;
@
(
negedge
reset
_or_GTRXRESET
)
;
repeat
(
80
)
@
(
posedge
GTREFCLK0
)
;
tx_rst_done
<=
1'b1
;
end
initial
forever
@
(
posedge
reset
)
forever
@
(
posedge
reset
_or_GTRXRESET
)
begin
rx_rst_done
<=
1'b0
;
@
(
negedge
reset
)
;
@
(
negedge
reset
_or_GTRXRESET
)
;
repeat
(
100
)
@
(
posedge
GTREFCLK0
)
;
rx_rst_done
<=
1'b1
;
...
...
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