Skip to content

Commit

Permalink
Increase size of iMem for fmcClockTests
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddemoll committed Apr 24, 2024
1 parent 37fb508 commit ddd9ede
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
20 changes: 17 additions & 3 deletions bittide-instances/src/Bittide/Instances/Hitl/FmcClock.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import Clash.Prelude
import Clash.Explicit.Prelude (orReset, noReset)

import Data.Maybe (fromMaybe, isJust)
import Language.Haskell.TH (runIO)
import System.FilePath

import Protocols
import Protocols.Wishbone
Expand All @@ -30,11 +32,14 @@ import Bittide.ClockControl.Registers (dataCountsWb)
import Bittide.Counter (domainDiffCounter)
import Bittide.DoubleBufferedRam
import Bittide.Hitl (HitlTests, testsFromEnum, hitlVio, singleFpga)
import Bittide.Instances.Domains
import Bittide.ProcessingElement
import Bittide.ProcessingElement.Util (memBlobsFromElf)
import Bittide.SharedTypes (ByteOrder(BigEndian))
import Bittide.Wishbone

import Bittide.Instances.Domains
import Bittide.Instances.Hitl.FincFdec (TestState(..), Test(..), testStateToDoneSuccess)
import Project.FilePath

import Clash.Cores.Xilinx.GTH (ibufds_gte3, gthCore)
import Clash.Explicit.Reset.Extra (Asserted(..), xpmResetSynchronizer)
Expand Down Expand Up @@ -113,11 +118,20 @@ fmcClockRiscv jtagIn sclBs sdaIn dataCounts uartRx testSelect =
Dummy device is needed because the total number of devices cannot be equal to a power
of 2. The dummy device must then be mapped to the zero-address.
-}
(iMem, dMem) = $(do
root <- runIO $ findParentContaining "cabal.project"
let
elfDir = root </> firmwareBinariesDir "riscv32imc-unknown-none-elf" Release
elfPath = elfDir </> "fmc-clock"
iSize = 128 * 1024 -- 128 KB
dSize = 64 * 1024 -- 64 KB
memBlobsFromElf BigEndian (Just iSize, Just dSize) elfPath Nothing)

peConfig =
PeConfig
(0b1000 :> 0b0100 :> 0b0001 :> 0b0010 :> 0b0011 :> 0b0101 :> 0b0110 :> 0b0111 :> (0b0000 :: Unsigned 4) :> Nil)
(Undefined @(Div (128 * 1024) 4)) -- iMem 128 KiB
(Undefined @(Div (64 * 1024) 4)) -- dMem 64 KiB
(Reloadable $ Blob iMem)
(Reloadable $ Blob dMem)

fmcClockTests ::
"SYSCLK_125" ::: DiffClock Ext125 ->
Expand Down
1 change: 1 addition & 0 deletions bittide-shake/src/Clash/Shake/Vivado.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ mkSynthesisTcl outputDir outOfContext boardPart constraints manifest@LocatedMani
#{constraintDigests}
set_msg_config -severity {CRITICAL WARNING} -new_severity ERROR

set_param synth.elaboration.rodinMoreOptions "rt::set_parameter var_size_limit 4194304"
#{constraintsString}
file mkdir {#{outputDir </> "reports"}}
file mkdir {#{outputDir </> "checkpoints"}}
Expand Down

0 comments on commit ddd9ede

Please sign in to comment.