clash-systemverilog 0.6.6 → 0.6.7
raw patch · 3 files changed
+24/−14 lines, 3 filesdep ~clash-lib
Dependency ranges changed: clash-lib
Files
- CHANGELOG.md +5/−1
- clash-systemverilog.cabal +10/−10
- src/CLaSH/Backend/SystemVerilog.hs +9/−3
CHANGELOG.md view
@@ -1,8 +1,12 @@ # Changelog for the [`clash-systemverilog`](http://hackage.haskell.org/package/clash-systemverilog) package +## 0.6.7 *July 15th 2016*+* New features:+ * Support clash-lib-0.6.18+ ## 0.6.6 *March 11th 2016* * New features:- * Support `clash-lib` 0.6+ * Support `clash-lib` 0.6.11 * Generated structs are packed * Elements of arrays are packed * Fixes bugs:
clash-systemverilog.cabal view
@@ -1,5 +1,5 @@ Name: clash-systemverilog-Version: 0.6.6+Version: 0.6.7 Synopsis: CAES Language for Synchronous Hardware - SystemVerilog backend Description: CλaSH (pronounced ‘clash’) is a functional hardware description language that@@ -97,15 +97,15 @@ TupleSections ViewPatterns - Build-depends: base >= 4.6.0.1 && < 5,- clash-lib >= 0.6.11,- clash-prelude >= 0.10.1,- fgl >= 5.4.2.4,- lens >= 3.9.2,- mtl >= 2.1.2,- text >= 0.11.3.1,- unordered-containers >= 0.2.3.3,- wl-pprint-text >= 1.1.0.0+ Build-depends: base >= 4.6.0.1 && < 5,+ clash-lib >= 0.6.18 && < 0.7,+ clash-prelude >= 0.10.1 && < 0.11,+ fgl >= 5.4.2.4 && < 5.6,+ lens >= 3.9.2 && < 4.15,+ mtl >= 2.1.2 && < 2.3,+ text >= 0.11.3.1 && < 1.3,+ unordered-containers >= 0.2.3.3 && < 0.3,+ wl-pprint-text >= 1.1.0.0 && < 1.2 Exposed-modules: CLaSH.Backend.SystemVerilog
src/CLaSH/Backend/SystemVerilog.hs view
@@ -33,6 +33,7 @@ import Text.PrettyPrint.Leijen.Text.Monadic import CLaSH.Backend+import CLaSH.Driver.Types (SrcSpan, noSrcSpan) import CLaSH.Netlist.BlackBox.Types (HdlSyn (..)) import CLaSH.Netlist.BlackBox.Util (extractLiterals, renderBlackBox) import CLaSH.Netlist.Id (mkBasicId')@@ -56,6 +57,7 @@ , _modNm :: String , _idSeen :: [Identifier] , _oports :: [Identifier]+ , _srcSpan :: SrcSpan , _intWidth :: Int -- ^ Int/Word/Integer bit-width , _hdlsyn :: HdlSyn }@@ -63,7 +65,7 @@ makeLenses ''SystemVerilogState instance Backend SystemVerilogState where- initBackend = SystemVerilogState HashSet.empty [] HashMap.empty 0 "" [] []+ initBackend = SystemVerilogState HashSet.empty [] HashMap.empty 0 "" [] [] noSrcSpan #ifdef CABAL primDir = const (Paths_clash_systemverilog.getDataFileName "primitives") #else@@ -97,6 +99,8 @@ hdlSyn = use hdlsyn mkBasicId = return (filterReserved . mkBasicId' True) setModName nm s = s {_modNm = nm}+ setSrcSpan = (srcSpan .=)+ getSrcSpan = use srcSpan type SystemVerilogM a = State SystemVerilogState a @@ -142,8 +146,10 @@ else s -- | Generate VHDL for a Netlist component-genVerilog :: String -> Component -> SystemVerilogM (String,Doc)-genVerilog _ c = (unpack cName,) A.<$> verilog+genVerilog :: String -> SrcSpan -> Component -> SystemVerilogM (String,Doc)+genVerilog _ sp c = do+ setSrcSpan sp+ (unpack cName,) A.<$> verilog where cName = componentName c verilog = "// Automatically generated SystemVerilog-2005" <$$>