Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bittide-experiments/src/Bittide/Topology.hs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ dumbbell sw@SNat sl@SNat sr@SNat =
-- nodes of each sub-graph.
hourglass :: SNat n -> Topology (n + n)
hourglass sn =
( dumbbell sn d0 sn )
( dumbbell d0 sn sn )
{ topologyName = "hourglass"
, topologyType = Hourglass $ snatToInteger sn
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fullMeshHwTest refClk sysClk IlaControl{syncRst = rst, ..} rxns rxps miso =
capture = (captureFlag .&&. allUp) .||. unsafeToActiveHigh syncRst

fincFdecIla :: Signal Basic125 ()
fincFdecIla = ila
fincFdecIla = setName @"fincFdecIla" $ ila
(ilaConfig $
"trigger_0"
:> "capture_0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ fullMeshHwTest refClk sysClk IlaControl{syncRst = rst, ..} rxns rxps miso =
capture = (captureFlag .&&. allUp) .||. unsafeToActiveHigh syncRst

fincFdecIla :: Signal Basic125 ()
fincFdecIla = ila
fincFdecIla = setName @"fincFdecIla" $ ila
(ilaConfig $
"trigger_0"
:> "capture_0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ topologyTest refClk sysClk sysRst IlaControl{syncRst = rst, ..} rxns rxps miso c
capture = (captureFlag .&&. allUp) .||. unsafeToActiveHigh syncRst

fincFdecIla :: Signal Basic125 ()
fincFdecIla = ila
fincFdecIla = setName @"fincFdecIla" ila
(ilaConfig $
"trigger_0"
:> "capture_0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ module Bittide.Instances.Hitl.Post.BoardTestExtended (postBoardTestExtended) whe
import Prelude

import Data.Csv
import Data.List (isSuffixOf)
import System.Exit (ExitCode(..))
import Test.Tasty.HUnit
import System.FilePath

import Bittide.Instances.Hitl.Post.PostProcess

Expand Down Expand Up @@ -61,7 +63,9 @@ processCsv csvPath_ = do
postBoardTestExtended :: ExitCode -> [FlattenedIlaCsvPath] -> Assertion
postBoardTestExtended _exitCode ilaCsvPaths = do
let
csvToProcess = filter ((== "boardTestIla") . ilaName) ilaCsvPaths
csvToProcess = filter ((baseNameEndsWith "boardTestIla") . ilaName) ilaCsvPaths
assertBool "Expected at least 1 CSV file, but got 0" $ not (null csvToProcess)
mapM_ (processCsv . csvPath) csvToProcess
putStrLn $ "Successfully performed post processing of " <> show (length csvToProcess) <> " ILA CSV dumps"
where
baseNameEndsWith x = isSuffixOf x . takeBaseName
10 changes: 7 additions & 3 deletions bittide-shake/data/tcl/HardwareTest.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,14 @@ proc get_ila_dicts {} {
foreach hw_ila $hw_ilas {
set ila_dict {}

# The short name is the name of the module the ILA is in. For example a
# cell named `fullMeshSwCcTest/ilaPlot/ila_inst` will give the short
# name `ilaPlot`.
set cell_name [get_property CELL_NAME $hw_ila]
set idx_start [expr {[string first _ $cell_name] + 1}]
set idx_end [expr {[string first / $cell_name] - 1}]
set short_name [string range $cell_name $idx_start $idx_end]
set before_last [expr [string last / $cell_name] - 1]
set module_name [string range $cell_name 0 $before_last]
set after_second_to_last [expr [string last / $module_name] + 1]
set short_name [string range $cell_name $after_second_to_last $before_last]
dict set ila_dict name $short_name
dict set ila_dict cell_name $cell_name

Expand Down
4 changes: 2 additions & 2 deletions bittide/src/Bittide/ProcessingElement.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ processingElement ::
(Vec (nBusses-2) (Wishbone dom 'Standard (MappedBusAddrWidth 32 nBusses) (Bytes 4)))
processingElement (PeConfig memMapConfig initI initD) = circuit $ \jtagIn -> do
(iBus0, dBus0) <- rvCircuit (pure low) (pure low) (pure low) -< jtagIn
iBus1 <- setName @"instr_bus" (ilaWb 2 D4096) -< iBus0
dBus1 <- setName @"data_bus" (ilaWb 2 D4096) -< dBus0
iBus1 <- ilaWb (SSymbol @"instructionBus") 2 D4096 -< iBus0
dBus1 <- ilaWb (SSymbol @"dataBus") 2 D4096 -< dBus0
([iMemBus, dMemBus], extBusses) <-
(splitAtC d2 <| singleMasterInterconnect memMapConfig) -< dBus1
wbStorage initD -< dMemBus
Expand Down
10 changes: 7 additions & 3 deletions bittide/src/Bittide/Wishbone.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ dupWb = Circuit go
-- transaction, while capture will be active for as long as trigger and a cycle
-- after it.
ilaWb ::
forall dom addrW a .
forall name dom addrW a .
HiddenClock dom =>
-- | Name of the module of the `ila` wrapper. Naming the internal ILA is
-- unreliable when more than one ILA is used with the same arguments, but the
-- module name can be set reliably.
SSymbol name ->
-- | Number of registers to insert at each probe. Supported values: 0-6.
-- Corresponds to @C_INPUT_PIPE_STAGES@. Default is @0@.
Index 7 ->
Expand All @@ -111,7 +115,7 @@ ilaWb ::
Circuit
(Wishbone dom 'Standard addrW a)
(Wishbone dom 'Standard addrW a)
ilaWb stages0 depth0 = Circuit $ \(m2s, s2m) ->
ilaWb SSymbol stages0 depth0 = Circuit $ \(m2s, s2m) ->
let
-- Our TCL infrastructure looks for 'trigger' and 'capture' and uses it to
-- trigger the ILA and do selective capture. Though defaults are changable
Expand All @@ -121,7 +125,7 @@ ilaWb stages0 depth0 = Circuit $ \(m2s, s2m) ->
capture = trigger .||. dflipflop trigger

ilaInst :: Signal dom ()
ilaInst = ila
ilaInst = setName @name $ ila
((ilaConfig $
"m2s_addr"
:> "m2s_writeData"
Expand Down