summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Matthijs Kooijman [Tue, 27 Jan 2009 14:50:44 +0000 (15:50 +0100)]
Make the state monad calling code more pretty.
Matthijs Kooijman [Tue, 27 Jan 2009 14:24:17 +0000 (15:24 +0100)]
Run mkHWFunction and addFunc in a State monad.
This uses a state consisting of a VHDLSession. The invocation of these
functions is a bit ugly now, that will be cleaned up next.
Matthijs Kooijman [Tue, 27 Jan 2009 13:36:17 +0000 (14:36 +0100)]
Derive Show for the data types we define.
Matthijs Kooijman [Thu, 22 Jan 2009 19:34:54 +0000 (20:34 +0100)]
Remove the Args constructor, just use a list instead.
Matthijs Kooijman [Thu, 22 Jan 2009 19:32:18 +0000 (20:32 +0100)]
Look up the port names in the session when generating an architecture.
Matthijs Kooijman [Thu, 22 Jan 2009 19:28:34 +0000 (20:28 +0100)]
Generate a HWFunction for the function that is being generated.
Matthijs Kooijman [Thu, 22 Jan 2009 16:40:04 +0000 (17:40 +0100)]
Lookup input port names for instantiations in the session.
This replaces the previously hardcoded portnames.
Matthijs Kooijman [Thu, 22 Jan 2009 16:37:14 +0000 (17:37 +0100)]
Make getPortMapEntry accept a PortNameMap.
Matthijs Kooijman [Thu, 22 Jan 2009 16:33:51 +0000 (17:33 +0100)]
Pass around a session variable.
This session variable stores a list of available functions and a number
for generating unique names. So far, the session is only used to lookup
output port names and is read only (ie, not returned from functions).
Matthijs Kooijman [Thu, 22 Jan 2009 15:33:44 +0000 (16:33 +0100)]
Use ForSyDe.Backend.VHDL modules to generate VHDL.
The current code is still a bit hacky, but no longer contains hardcoded
VHDL and instead builds a VHDL AST which is then printed by modules from
ForSyDe.
Note that this uses internal ForSyDe modules. ForSyDe was modified to
expose these internal modules.
Matthijs Kooijman [Thu, 22 Jan 2009 13:55:47 +0000 (14:55 +0100)]
Remove the entity generation code.
Matthijs Kooijman [Wed, 21 Jan 2009 12:40:07 +0000 (13:40 +0100)]
Handle tuple constructors in expressions.
This enables a hardware model to have multiple output ports, using a tuple
type. The code is still a bit hacky and only works for two-tuples.
Matthijs Kooijman [Wed, 21 Jan 2009 12:38:15 +0000 (13:38 +0100)]
Let the Adders module export everything.
Matthijs Kooijman [Wed, 21 Jan 2009 12:37:56 +0000 (13:37 +0100)]
Add a haskell model for a half adder.
Matthijs Kooijman [Wed, 21 Jan 2009 10:52:37 +0000 (11:52 +0100)]
Add an error message.
Matthijs Kooijman [Wed, 21 Jan 2009 10:49:52 +0000 (11:49 +0100)]
Map output ports as well as input ports.
Matthijs Kooijman [Wed, 21 Jan 2009 10:48:58 +0000 (11:48 +0100)]
Generate input port names from the argument types.
This replaces the hardcoded list of input port names which was used for
testing before.
Matthijs Kooijman [Mon, 19 Jan 2009 15:47:35 +0000 (16:47 +0100)]
Add .gitignore file.
Matthijs Kooijman [Mon, 19 Jan 2009 15:45:52 +0000 (16:45 +0100)]
Intial import of some haskell programs.
Contains the following files:
* Adders.hs - Some Haskell modelling of hardware adders.
* Alu.hs - A haskell model of an (extremely) simple cpu.
* Bits.hs - Stuff relating to a basic "Bit" datatype.
* Inverter.hs - A haskell model of an inverter.
* Parser.hs - A simple haskell parser using Language.Haskell libraries.
* Shifter.hs - A haskell model of an interactive xor-shifter.
* Sim.hs - Some utilities to run hardware models.
* Translator.hs - A basic program that uses GHC to read Haskell code and
translates it into VHDL. This code is still very preliminary.