-- | A controller for a HyperBus interface, allowing for I/O to four chips. package HyperBus where -- | The HyperBus output pins. interface HyperBusOut = ck :: Bit 1 ck_n :: Bit 1 cs0_n :: Bit 1 cs1_n :: Bit 1 cs2_n :: Bit 1 cs3_n :: Bit 1 reset_n :: Bit 1 rwds_out :: Maybe (Bit 1) dq_out :: Maybe (Bit 8) mkHyperBus :: Bit 1 -> Bit 8 -> Module HyperBusOut mkHyperBus rwds_in dq_in = module clockPin :: Reg (Bit 1) <- mkReg 0 rules "update_clock_pin": when True ==> do clockPin := invert clockPin interface HyperBusOut ck = clockPin ck_n = invert clockPin cs0_n = 1 cs1_n = 1 cs2_n = 1 cs3_n = 1 reset_n = 1 rwds_out = Nothing dq_out = Nothing mkDividedHyperBus :: Integer -> Bit 1 -> Bit 8 -> Module HyperBusOut mkDividedHyperBus _divisor rwds_in dq_in = module -- TODO mkHyperBus rwds_in dq_in -- vim: set ft=haskell :