-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #379 from GSI-CS-CO/fallout_pexp_pps
Fallout pexp pps
- Loading branch information
Showing
10 changed files
with
1,838 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
# PHY Encoder Error Counter | ||
|
||
> [!IMPORTANT] | ||
> In this branch the ECA and the PCI-E module for the pexarria5 have been turned off for quicker build times for testing | ||
[!IMPORTANT] | ||
This module counts the pulses coming from the PHY enc_err output and transfers them to the system clock domain. There they can be read via Wishbone. | ||
|
||
This module counts the pulses coming from the PHY enc_err output and transfers them to the system clock domain. There they can be read via Wishbone. | ||
- `0x00` Error Counter 1 | ||
- `0x04` Error Counter 2 (auxiliary) | ||
- `0x08` Overflow Flag 1 | ||
- `0x0C` Overflow Flag 2 | ||
| Address | Meaning | | ||
| ------- | ------- | | ||
| 0x00 | Error Counter 1 | | ||
| 0x04 | Error Counter 2 (auxiliary) | | ||
| 0x08 | Overflow Flag 1 | | ||
| 0x0C | Overflow Flag 2 (auxiliary) | | ||
|
||
## Manual Counter Reset | ||
**Be sure to save or write down the error count before reset. The reset completely deletes the data** | ||
To reset a counter without a power cycle you can write a one into the counter address. The following write resets error counter one and it's overflow flag. | ||
`eb-write <proto/host/port> 0xXXXXXX00/4 0x00000001` | ||
|
||
The reset is a toggle. The counter won't rise as long as it is set. So the reset register has to be set to 0 again by: | ||
`eb-write <proto/host/port> 0xXXXXXX00/4 0x00000000` | ||
|
||
## Clock Domain Crossing | ||
The clock domain is crossed using grey code encoding and a sync register. | ||
|
||
**Be sure to save or write down the error count before reset. The reset completely deletes the data.** | ||
|
||
To reset a counter without a power cycle you can write a one into the counter address. The following write resets error counter one and it's overflow flag: | ||
|
||
``` | ||
eb-write <proto/host/port> 0xXXXXXX00/4 0x00000001 | ||
``` | ||
|
||
The reset is a toggle. The counter won't rise as long as it is set. So the reset register has to be set to 0 again by: | ||
|
||
``` | ||
eb-write <proto/host/port> 0xXXXXXX00/4 0x00000000 | ||
``` | ||
|
||
## Clock Domain Crossing | ||
|
||
The clock domain is crossed using gray code encoding and a sync register. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TARGET = pexp_pps | ||
DEVICE = 5AGXMA3D4 | ||
FLASH = EPCQ256 | ||
SPI_LANES = ASx4 | ||
RAM_SIZE = 131072 | ||
|
||
include ../../build.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
target = "altera" | ||
action = "synthesis" | ||
|
||
fetchto = "../../../ip_cores" | ||
|
||
syn_device = "5agxma3d4f" | ||
syn_grade = "i3" | ||
syn_package = "27" | ||
syn_top = "pexp_pps" | ||
syn_project = "pexp_pps" | ||
|
||
quartus_preflow = "pexp_pps.tcl" | ||
|
||
modules = { | ||
"local" : [ | ||
"../../../top/gsi_pexp/pps", | ||
] | ||
} | ||
|
||
syn_tool = "quartus" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PROJECT_REVISION = "pexp_pps" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set platform "pexp_pps" | ||
source ../../autogen.tcl | ||
source ../../../modules/build_id/build_id.tcl | ||
source ../../../ip_cores/general-cores/platform/altera/networks/arria5.tcl | ||
source ../../../ip_cores/general-cores/platform/altera/wb_pcie/arria5.tcl | ||
source ../../../modules/pll/arria5/arria5_pll.tcl | ||
source ../../../ip_cores/wr-cores/platform/altera/wr_arria5_phy/wr_arria5_phy.tcl | ||
source ../../common/arria5_legacy_flash_patch.tcl | ||
source ../../common/arria5_serdes_lvds_patch.tcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
files = [ | ||
"pexp_pps.vhd", | ||
"../../common/arria5.sdc", | ||
"ramsize_pkg.vhd" | ||
] | ||
|
||
modules = { | ||
"local" : [ | ||
"../../..", | ||
] | ||
} |
Oops, something went wrong.