+
+data HWFunction = HWFunction { -- A function that is available in hardware
+ inPorts :: PortNameMap,
+ outPorts :: PortNameMap
+ --entity :: AST.EntityDec
+}
+
+data VHDLSession = VHDLSession {
+ nameCount :: Int, -- A counter that can be used to generate unique names
+ funcs :: [(String, HWFunction)] -- All functions available, indexed by name
+}
+
+builtin_funcs =
+ [
+ ("hwxor", HWFunction (Args [Port "a", Port "b"]) (Port "o")),
+ ("hwand", HWFunction (Args [Port "a", Port "b"]) (Port "o"))
+ ]