Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ILA short name #456

Closed
wants to merge 1 commit into from
Closed
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
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
5 changes: 2 additions & 3 deletions bittide-shake/data/tcl/HardwareTest.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,8 @@ proc get_ila_dicts {} {
set ila_dict {}

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 after_last [expr [string last "/" $cell_name] + 1]
set short_name [string range $cell_name $after_last end]
dict set ila_dict name $short_name
dict set ila_dict cell_name $cell_name

Expand Down
Loading