quieter builds, more type uniformity, full compiles

- made builds less verbose on Mac by removing `-cpp`
 - made type constructors for most instances of `(UInt (TLog n))`
 - addressed cases where types built upon `(UInt (TLog n))` may have
   a max value of `n`, which necessitates changing the type to
   ` (UInt (TLog (TAdd 1 n)))`
 - compiler wouldn't fully evaluate types unless mkBus was
   instantiated
This commit is contained in:
Yehowshua Immanuel 2025-04-10 20:46:53 -04:00
parent 548a2f26bd
commit 5efef8b19c
7 changed files with 58 additions and 20 deletions

View file

@ -11,13 +11,13 @@ interface (Core :: # -> *) clkFreq = {
mkCore :: Module (Core clkFreq)
mkCore = do
counter :: Reg (UInt (TLog clkFreq)) <- mkReg 0
counter :: Reg (MkClkDivType clkFreq) <- mkReg 0
tickSecond :: Wire Bool <- mkDWire False
uartOut :: Wire (Bit 8) <- mkWire;
ledOut :: Reg (Bit 8) <- mkReg 0
let clkFreqInt :: Integer = valueOf clkFreq
let clkFreqUInt :: UInt (TLog clkFreq) = fromInteger clkFreqInt
let clkFreqUInt :: (MkClkDivType clkFreq) = fromInteger clkFreqInt
let val :: Real = fromInteger clkFreqInt
messageM $ "mkCore clkFreq" + realToString val