matthijs/master-project/cλash.git
14 years agoGreat speed-up in type generation
Christiaan Baaij [Sat, 11 Jul 2009 20:23:59 +0000 (22:23 +0200)]
Great speed-up in type generation

Now just normalize tfp ints that are used as keys for the type map
Before these were translated to integers.

Save a map caches tfp ints, and their correspding integer literal

14 years agoCorrectly handle negate for unsigned integers
Christiaan Baaij [Thu, 9 Jul 2009 14:22:24 +0000 (16:22 +0200)]
Correctly handle negate for unsigned integers

14 years agoPartly fixed implementation for integer literals.
Christiaan Baaij [Wed, 8 Jul 2009 14:44:01 +0000 (16:44 +0200)]
Partly fixed implementation for integer literals.

But it still needs alot of fixing

14 years agoVERY Ad-hoc support of literals.
Christiaan Baaij [Wed, 8 Jul 2009 13:21:41 +0000 (15:21 +0200)]
VERY Ad-hoc support of literals.

Current implementation will probably fail in a lot of places

14 years agoAdded support for SizedInts and cleaned up some function related to SizedWords
Christiaan Baaij [Wed, 8 Jul 2009 12:20:10 +0000 (14:20 +0200)]
Added support for SizedInts and cleaned up some function related to SizedWords

14 years agoStarted adding numeric operations
Christiaan Baaij [Tue, 7 Jul 2009 12:39:16 +0000 (14:39 +0200)]
Started adding numeric operations

14 years agoCaching converted tfp integers to speedup translation
Christiaan Baaij [Mon, 6 Jul 2009 14:57:41 +0000 (16:57 +0200)]
Caching converted tfp integers to speedup translation

14 years agoUpdated cabal file to reflect change in TFVec, and the need for the filepath library
Christiaan Baaij [Fri, 3 Jul 2009 19:49:06 +0000 (21:49 +0200)]
Updated cabal file to reflect change in TFVec, and the need for the filepath library

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Fri, 3 Jul 2009 19:42:19 +0000 (21:42 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Let inlinefun inline everything non-representable.
  Unify typeprop and funprop into argprop.
  Extract only representable arguments.
  Add predicates for testing representability of types.

14 years agoMade Bit an instance of Lift so it can be used in vectorTH
Christiaan Baaij [Fri, 3 Jul 2009 19:41:04 +0000 (21:41 +0200)]
Made Bit an instance of Lift so it can be used in vectorTH

vectorTH works now, but you will need the latest version of TFVec

14 years agoLet inlinefun inline everything non-representable.
Matthijs Kooijman [Fri, 3 Jul 2009 17:32:10 +0000 (19:32 +0200)]
Let inlinefun inline everything non-representable.

This changes its name to inlinenonrep and makes it inline everything that
is not representable (which helps in particular for dictionary
construction expressions...).

I've not yet changed the conditions in various other transforms, so if
something silly would happen like having a dictionary as the value or
scrutinee of a case of let expression, things might go into an infinite
loop.

Also, since HTypes are generated very often now, things are really
starting to slow down...

14 years agoUnify typeprop and funprop into argprop.
Matthijs Kooijman [Fri, 3 Jul 2009 17:09:32 +0000 (19:09 +0200)]
Unify typeprop and funprop into argprop.

This also generalizes the conditions a bit by propagating anything that is
not representable.

14 years agoExtract only representable arguments.
Matthijs Kooijman [Fri, 3 Jul 2009 16:35:02 +0000 (18:35 +0200)]
Extract only representable arguments.

Previously, anything but types and functions was extracted. This
definition is slightly more general, but it should not matter for the
programs we work with.

14 years agoAdd predicates for testing representability of types.
Matthijs Kooijman [Fri, 3 Jul 2009 16:33:46 +0000 (18:33 +0200)]
Add predicates for testing representability of types.

These predicates try to build a VHDL type from a Core Type, to see if it
will be representable in hardware.

14 years agoLet mkHType also return errors using Either.
Matthijs Kooijman [Fri, 3 Jul 2009 11:40:43 +0000 (13:40 +0200)]
Let mkHType also return errors using Either.

14 years agoMerge git://github.com/darchon/clash into cλash
Matthijs Kooijman [Fri, 3 Jul 2009 11:27:57 +0000 (13:27 +0200)]
Merge git://github.com/darchon/clash into cλash

* git://github.com/darchon/clash:
  Keys for typemap can now deal with vector lengths based on type operators

Conflicts:
Generate.hs
VHDLTools.hs

14 years agoPut a TypeState in TransformState.
Matthijs Kooijman [Fri, 3 Jul 2009 11:16:55 +0000 (13:16 +0200)]
Put a TypeState in TransformState.

This will allow transforms to test if a Type is representable in VHDL.

14 years agoSplit off the type related VHDLState variables.
Matthijs Kooijman [Fri, 3 Jul 2009 11:10:05 +0000 (13:10 +0200)]
Split off the type related VHDLState variables.

These are now put in a substate of VHDLState, named TypeState. This allows
a TypeState to be put into TransformState later on as well.

14 years agoMake vhdl_ty and friends return errors with Either.
Matthijs Kooijman [Fri, 3 Jul 2009 10:28:55 +0000 (12:28 +0200)]
Make vhdl_ty and friends return errors with Either.

Previously, error messages were passed forward. However, this does not
allow a type lookup to gracefully fail, which will be needed for
normalization soon. Now, error messages are returned using an Either
value, so they can be ignored at top level if needed.

14 years agoKeys for typemap can now deal with vector lengths based on type operators
Christiaan Baaij [Fri, 3 Jul 2009 09:48:02 +0000 (11:48 +0200)]
Keys for typemap can now deal with vector lengths based on type operators

Implementation is very slow, evalCoreExpr has to be run every time we
lookup and insert a new vector.

14 years agoStop extracting dataconstructor arguments.
Matthijs Kooijman [Fri, 3 Jul 2009 09:33:03 +0000 (11:33 +0200)]
Stop extracting dataconstructor arguments.

Previously, dataconstructor arguments that had no arguments themselves
(eg. False, or High), would be extracted from an argument list, even
though they were just simple variable references. Since such a datacon can
be translated to a VHDL literal and VHDL supports mapping expressions (at
least constant expressions) to a port, there is no need for extraction
anymore.

14 years agoMerge git://github.com/darchon/clash into cλash
Matthijs Kooijman [Thu, 2 Jul 2009 14:47:18 +0000 (16:47 +0200)]
Merge git://github.com/darchon/clash into cλash

* git://github.com/darchon/clash:
  We now output VHDL types in the correct order
  Removed the need for a special vector-type map.
  Added builtin functions: concat, reverse, iterate, iteraten, generate and generaten

14 years agoWe now output VHDL types in the correct order
Christiaan Baaij [Thu, 2 Jul 2009 14:44:58 +0000 (16:44 +0200)]
We now output VHDL types in the correct order

14 years agoRemoved the need for a special vector-type map.
Christiaan Baaij [Thu, 2 Jul 2009 13:19:07 +0000 (15:19 +0200)]
Removed the need for a special vector-type map.

Vector types are stripped of their length and then used as key.
Note that is of course an invalid haskell type, and is only meant
for internal use.

14 years agoAdd TODO regarding removal of is_wild.
Matthijs Kooijman [Wed, 1 Jul 2009 15:00:49 +0000 (17:00 +0200)]
Add TODO regarding removal of is_wild.

14 years agoAdded builtin functions: concat, reverse, iterate, iteraten, generate and generaten
Christiaan Baaij [Wed, 1 Jul 2009 14:14:19 +0000 (16:14 +0200)]
Added builtin functions: concat, reverse, iterate, iteraten, generate and generaten

14 years agoAdded builtin functions shiftl, shiftr, null, rotl, rotr
Christiaan Baaij [Tue, 30 Jun 2009 15:01:48 +0000 (17:01 +0200)]
Added builtin functions shiftl, shiftr, null, rotl, rotr

14 years agoUpdated all error messages to include modulename and function name
Christiaan Baaij [Tue, 30 Jun 2009 11:28:41 +0000 (13:28 +0200)]
Updated all error messages to include modulename and function name

14 years agoAdded support for copyn and copy
Christiaan Baaij [Mon, 29 Jun 2009 15:17:50 +0000 (17:17 +0200)]
Added support for copyn and copy

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Mon, 29 Jun 2009 13:06:34 +0000 (15:06 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Make genMap support mapping applications.
  Allow arguments to builtins to be applications.

14 years agoAdded "lengthT"
Christiaan Baaij [Mon, 29 Jun 2009 13:06:21 +0000 (15:06 +0200)]
Added "lengthT"

14 years agoMerge git://github.com/darchon/clash into cλash
Matthijs Kooijman [Mon, 29 Jun 2009 12:49:25 +0000 (14:49 +0200)]
Merge git://github.com/darchon/clash into cλash

* git://github.com/darchon/clash:
  Added unzip
  Added "zip" function
  Added <+ and ++ operations
  Added support for instances of tfp integer, but poorly...
  Added select builtin
  Parameterized fold, so that it can be used for foldl and foldr

14 years agoMake genMap support mapping applications.
Matthijs Kooijman [Mon, 29 Jun 2009 12:47:56 +0000 (14:47 +0200)]
Make genMap support mapping applications.

This is a companion commit to the previous one, to handle the changes in
normal form introduced there. This only works for map so far, the other
higher order functions will be changed later.

14 years agoAllow arguments to builtins to be applications.
Matthijs Kooijman [Mon, 29 Jun 2009 12:45:56 +0000 (14:45 +0200)]
Allow arguments to builtins to be applications.

This allows things like "map (hwand Low) as" or even "map (hwand x) as" in
normal form. Previously, the "hwand Low" part would be put into its own
function, but that could only work when mapping expression without free
variables.

14 years agoAdded unzip
Christiaan Baaij [Mon, 29 Jun 2009 09:02:31 +0000 (11:02 +0200)]
Added unzip

Added typenames to typlerecordname to make unique id's

14 years agoAdded "zip" function
Christiaan Baaij [Mon, 29 Jun 2009 08:11:48 +0000 (10:11 +0200)]
Added "zip" function

14 years agoAdded <+ and ++ operations
Christiaan Baaij [Sat, 27 Jun 2009 08:05:01 +0000 (10:05 +0200)]
Added <+ and ++ operations

14 years agoAdded support for instances of tfp integer, but poorly...
Christiaan Baaij [Fri, 26 Jun 2009 12:28:34 +0000 (14:28 +0200)]
Added support for instances of tfp integer, but poorly...
They are always used as 'structural' parameters for functions
and as such should not be turned in to ports when these
arguments are applied.

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Fri, 26 Jun 2009 11:09:19 +0000 (13:09 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Let exprToVar give a useful error message.
  Use tcSplitSigmaTy for getting at value arguments.
  Add is_simple predicate for applications and vars.
  Add function-typed argument extraction transform.
  Add has_free_vars predicate.
  Remove TODO that was already solved.

14 years agoAdded select builtin
Christiaan Baaij [Fri, 26 Jun 2009 11:08:55 +0000 (13:08 +0200)]
Added select builtin

14 years agoLet exprToVar give a useful error message.
Matthijs Kooijman [Fri, 26 Jun 2009 10:37:50 +0000 (12:37 +0200)]
Let exprToVar give a useful error message.

14 years agoUse tcSplitSigmaTy for getting at value arguments.
Matthijs Kooijman [Fri, 26 Jun 2009 10:36:39 +0000 (12:36 +0200)]
Use tcSplitSigmaTy for getting at value arguments.

Previously, some handcoded filters with isValArg and isDictId were used,
which were not so robust.

14 years agoAdd is_simple predicate for applications and vars.
Matthijs Kooijman [Fri, 26 Jun 2009 10:24:04 +0000 (12:24 +0200)]
Add is_simple predicate for applications and vars.

14 years agoParameterized fold, so that it can be used for foldl and foldr
Christiaan Baaij [Fri, 26 Jun 2009 10:06:32 +0000 (12:06 +0200)]
Parameterized fold, so that it can be used for foldl and foldr

14 years agoAdd function-typed argument extraction transform.
Matthijs Kooijman [Fri, 26 Jun 2009 10:00:37 +0000 (12:00 +0200)]
Add function-typed argument extraction transform.

This transform creates new functions for any function-typed argument to a
builtin function.

14 years agoAdd has_free_vars predicate.
Matthijs Kooijman [Fri, 26 Jun 2009 09:59:59 +0000 (11:59 +0200)]
Add has_free_vars predicate.

14 years agoRemove TODO that was already solved.
Matthijs Kooijman [Fri, 26 Jun 2009 08:55:46 +0000 (10:55 +0200)]
Remove TODO that was already solved.

14 years agoMerge git://github.com/darchon/clash into cλash
Matthijs Kooijman [Thu, 25 Jun 2009 14:58:57 +0000 (16:58 +0200)]
Merge git://github.com/darchon/clash into cλash

Disabled foldr generation again, it should either be updated to the
shorter form from my last commits, but preferably foldl should be
abstracted to handle both.

* git://github.com/darchon/clash:
  Added builtin function foldr
  Foldl correctly handles empty vectors

Conflicts:
Generate.hs
GlobalNameTable.hs

14 years agoAdd a anyset operation to HighOrdAlu, using foldl.
Matthijs Kooijman [Thu, 25 Jun 2009 14:45:30 +0000 (16:45 +0200)]
Add a anyset operation to HighOrdAlu, using foldl.

14 years agoRe-enable and clean up the foldl generation.
Matthijs Kooijman [Thu, 25 Jun 2009 14:43:58 +0000 (16:43 +0200)]
Re-enable and clean up the foldl generation.

This makes it use genApplication, meaning builtins can now also be folded.

14 years agoRemove the function wrapper hack from HighOrdAlu.
Matthijs Kooijman [Thu, 25 Jun 2009 13:19:09 +0000 (15:19 +0200)]
Remove the function wrapper hack from HighOrdAlu.

Compile the alu now gives a nice design with a four bit inverter, four bit
and gate and a multiplexer!

14 years agoUse genApplication in genMap and genZipWith.
Matthijs Kooijman [Thu, 25 Jun 2009 13:18:46 +0000 (15:18 +0200)]
Use genApplication in genMap and genZipWith.

This no longer limits these functions to component instantiations, but
also allows builtin functions to be called.

14 years agoRemove the unused Maybe typing in Entity ports.
Matthijs Kooijman [Thu, 25 Jun 2009 12:55:16 +0000 (14:55 +0200)]
Remove the unused Maybe typing in Entity ports.

14 years agoAdd mkIndexedName utility function.
Matthijs Kooijman [Thu, 25 Jun 2009 12:46:28 +0000 (14:46 +0200)]
Add mkIndexedName utility function.

14 years agoRestructure a lot of VHDL generating code.
Matthijs Kooijman [Thu, 25 Jun 2009 12:36:40 +0000 (14:36 +0200)]
Restructure a lot of VHDL generating code.

In particular:
 * The globalNameTable was moved into Generate.
 * A large part of mkConcSm was moved into Generate.
 * A BuiltinBuilder now accepts Either CoreBndr VHDLName and
   [Either CoreExpr AST.Expr], so we can reuse them even when we no longer
   have a CoreBndrs (this does not happen yet, though).

14 years agoAdded builtin function foldr
Christiaan Baaij [Thu, 25 Jun 2009 10:51:59 +0000 (12:51 +0200)]
Added builtin function foldr

14 years agoFoldl correctly handles empty vectors
Christiaan Baaij [Thu, 25 Jun 2009 10:21:03 +0000 (12:21 +0200)]
Foldl correctly handles empty vectors

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Thu, 25 Jun 2009 09:16:27 +0000 (11:16 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Unify all BuiltinBuilder functions.
  Give HighOrdAlu an and operation.
  Let tfvec_len and tfvec_elem give a proper error message.
  No longer use a view pattern in HsTools.

Conflicts:
Generate.hs

14 years agoUnify all BuiltinBuilder functions.
Matthijs Kooijman [Thu, 25 Jun 2009 09:12:07 +0000 (11:12 +0200)]
Unify all BuiltinBuilder functions.

By create a few wrapper functions, we can still leave the functions mostly
unchanged, but register them all with the same interface in the
GlobalNameTable.

14 years agoGive HighOrdAlu an and operation.
Matthijs Kooijman [Thu, 25 Jun 2009 09:11:10 +0000 (11:11 +0200)]
Give HighOrdAlu an and operation.

14 years agoLet tfvec_len and tfvec_elem give a proper error message.
Matthijs Kooijman [Thu, 25 Jun 2009 08:40:40 +0000 (10:40 +0200)]
Let tfvec_len and tfvec_elem give a proper error message.

14 years agoCleaned up genFoldlCall.
Christiaan Baaij [Thu, 25 Jun 2009 08:05:40 +0000 (10:05 +0200)]
Cleaned up genFoldlCall.

mkComponentInst now always maps the 'clk' port. You should never map it yourself again

14 years agoNo longer use a view pattern in HsTools.
Matthijs Kooijman [Wed, 24 Jun 2009 15:38:52 +0000 (17:38 +0200)]
No longer use a view pattern in HsTools.

This prevents GHC from giving an unwarranted warning, due to view pattern
support being incomplete.

14 years agoAdded builtin foldl function
Christiaan Baaij [Wed, 24 Jun 2009 14:52:19 +0000 (16:52 +0200)]
Added builtin foldl function

Also use mkVhdlBasicId for length attributes. Attributes can not have slashes

14 years agoAdded zipwithid
Christiaan Baaij [Wed, 24 Jun 2009 11:37:56 +0000 (13:37 +0200)]
Added zipwithid

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Wed, 24 Jun 2009 11:29:50 +0000 (13:29 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Generate vector functions on demand.

Conflicts:
Generate.hs
GlobalNameTable.hs

14 years agoGenerate vector functions on demand.
Matthijs Kooijman [Wed, 24 Jun 2009 11:21:45 +0000 (13:21 +0200)]
Generate vector functions on demand.

Previously, vector functions were generated all at the same time when the
corresponding vector type was generated.

14 years agoPulled genZipWithCall into VHDLSession monad
Christiaan Baaij [Wed, 24 Jun 2009 11:10:41 +0000 (13:10 +0200)]
Pulled genZipWithCall into VHDLSession monad

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Wed, 24 Jun 2009 10:35:50 +0000 (12:35 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Put the Builders in the VHDLSession.
  Remove the globalNameTable from the VHDLState.
  Swap the VHDLState and VHDLSession type names.

14 years agoAdded builtin zipwith function
Christiaan Baaij [Wed, 24 Jun 2009 10:19:30 +0000 (12:19 +0200)]
Added builtin zipwith function

14 years agoPut the Builders in the VHDLSession.
Matthijs Kooijman [Wed, 24 Jun 2009 10:08:05 +0000 (12:08 +0200)]
Put the Builders in the VHDLSession.

14 years agoRemove the globalNameTable from the VHDLState.
Matthijs Kooijman [Wed, 24 Jun 2009 10:03:38 +0000 (12:03 +0200)]
Remove the globalNameTable from the VHDLState.

The globalNameTable is never modified, so it can just be referenced
directly. Additionally, having it in the VHDLSession prevents us from
putting the Builder type in the VHDLSession Monad.

14 years agoBuiltin function 'empty' now returns a constant empty vector
Christiaan Baaij [Wed, 24 Jun 2009 09:41:40 +0000 (11:41 +0200)]
Builtin function 'empty' now returns a constant empty vector

14 years agoSwap the VHDLState and VHDLSession type names.
Matthijs Kooijman [Wed, 24 Jun 2009 09:40:12 +0000 (11:40 +0200)]
Swap the VHDLState and VHDLSession type names.

This is more consistent with the TransformSession/State and allows for
stacking monad transformers on top of the VHDLState later on.

14 years agoClean up the code a bit more.
Matthijs Kooijman [Wed, 24 Jun 2009 09:30:57 +0000 (11:30 +0200)]
Clean up the code a bit more.

This removes some unused parts, makes some naming a bit more consistent
and moves some code around.

Additionally, this disables vector function generating for now, since that
would create a dependency loop. Next up is changing the structure of that.

14 years agoAlways use everything declared in VHDL work library
Christiaan Baaij [Tue, 23 Jun 2009 20:55:53 +0000 (22:55 +0200)]
Always use everything declared in VHDL work library

14 years agoStarted cleanup of VHDL.hs and some builtin funcs now expect CoreBndrs instead of...
Christiaan Baaij [Tue, 23 Jun 2009 20:35:41 +0000 (22:35 +0200)]
Started cleanup of VHDL.hs and some builtin funcs now expect CoreBndrs instead of VHDLIds

VHDL.hs now only deals with functions that use the VHDLState Monad
All the other (helper) functions are now moved to VHDLTools.hs

Commented functions in VHDL.hs that relied on Flatfunctions. They
are ready for either removal, or should be updated to use Core
types.

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Tue, 23 Jun 2009 14:22:58 +0000 (16:22 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Add a hardware module for a generalized Alu.
  Make mkConcSm support a = b style bindings.
  Make appsimpl also simplify dataconstructors.
  Make subeverywhere support NonRec Lets.

14 years agoAdd a hardware module for a generalized Alu.
Matthijs Kooijman [Tue, 23 Jun 2009 14:17:23 +0000 (16:17 +0200)]
Add a hardware module for a generalized Alu.

14 years agoMake mkConcSm support a = b style bindings.
Matthijs Kooijman [Tue, 23 Jun 2009 14:14:47 +0000 (16:14 +0200)]
Make mkConcSm support a = b style bindings.

This is meant to provide support for assigning a dataconstructor to a
signal (though it will also work for other signals).

14 years agoMake appsimpl also simplify dataconstructors.
Matthijs Kooijman [Tue, 23 Jun 2009 14:12:50 +0000 (16:12 +0200)]
Make appsimpl also simplify dataconstructors.

These were previously left alone, since they were considered already
simple (they're simple variable references). However, a dataconstructor
can be translated to a VHDL expression, which can be assigned to a signal,
but not used in the port map of an component instantiation.

Also prevent letremovetop from inlining the datacon again.

14 years agoAdded builtin copy function
Christiaan Baaij [Tue, 23 Jun 2009 13:55:00 +0000 (15:55 +0200)]
Added builtin copy function

14 years agoMake subeverywhere support NonRec Lets.
Matthijs Kooijman [Tue, 23 Jun 2009 13:45:02 +0000 (15:45 +0200)]
Make subeverywhere support NonRec Lets.

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Tue, 23 Jun 2009 13:39:25 +0000 (15:39 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Support turning dataconstructors into VHDL constants.
  Use varToVHDLExpr in mkConcSm.

14 years agoMap generations always maps clk port
Christiaan Baaij [Tue, 23 Jun 2009 13:37:51 +0000 (15:37 +0200)]
Map generations always maps clk port

gen function is butt ugly, needs to be fixed

14 years agoMerge git://github.com/darchon/clash into cλash
Matthijs Kooijman [Tue, 23 Jun 2009 13:17:12 +0000 (15:17 +0200)]
Merge git://github.com/darchon/clash into cλash

* git://github.com/darchon/clash:
  Added singleton
  Almost finished support for 'map'

Conflicts:
VHDL.hs

14 years agoSupport turning dataconstructors into VHDL constants.
Matthijs Kooijman [Tue, 23 Jun 2009 13:13:20 +0000 (15:13 +0200)]
Support turning dataconstructors into VHDL constants.

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Tue, 23 Jun 2009 13:10:21 +0000 (15:10 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Ignore cast expressions when generating VHDL.
  Add Cast propagation transform.
  Make subeverywhere support Cast expressions.
  Remove a double line introduced a few commits back.
  Make subeverywhere complain for unknown expressions.

14 years agoAdded singleton
Christiaan Baaij [Tue, 23 Jun 2009 13:10:05 +0000 (15:10 +0200)]
Added singleton

14 years agoUse varToVHDLExpr in mkConcSm.
Matthijs Kooijman [Tue, 23 Jun 2009 13:07:12 +0000 (15:07 +0200)]
Use varToVHDLExpr in mkConcSm.

Previously, this used some custom set of functions. Using varToVHDLExpr
allows us to support constants for datacons later on.

14 years agoMerge git://github.com/darchon/clash into cλash
Matthijs Kooijman [Tue, 23 Jun 2009 12:54:54 +0000 (14:54 +0200)]
Merge git://github.com/darchon/clash into cλash

* git://github.com/darchon/clash:
  Added builtin function 'empty'

14 years agoIgnore cast expressions when generating VHDL.
Matthijs Kooijman [Tue, 23 Jun 2009 12:54:24 +0000 (14:54 +0200)]
Ignore cast expressions when generating VHDL.

14 years agoAdd Cast propagation transform.
Matthijs Kooijman [Tue, 23 Jun 2009 12:49:08 +0000 (14:49 +0200)]
Add Cast propagation transform.

This transform tries to push Casts down into the expression as much as
possible.

14 years agoMake subeverywhere support Cast expressions.
Matthijs Kooijman [Tue, 23 Jun 2009 12:41:30 +0000 (14:41 +0200)]
Make subeverywhere support Cast expressions.

14 years agoRemove a double line introduced a few commits back.
Matthijs Kooijman [Tue, 23 Jun 2009 12:36:28 +0000 (14:36 +0200)]
Remove a double line introduced a few commits back.

This line created some kind of infinite loop.

14 years agoMake subeverywhere complain for unknown expressions.
Matthijs Kooijman [Tue, 23 Jun 2009 12:27:48 +0000 (14:27 +0200)]
Make subeverywhere complain for unknown expressions.

Previously, subeverywhere would silently leave it unmodified.

14 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Tue, 23 Jun 2009 12:27:47 +0000 (14:27 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Do not apply eta expansion to application arguments.

14 years agoAlmost finished support for 'map'
Christiaan Baaij [Tue, 23 Jun 2009 12:27:08 +0000 (14:27 +0200)]
Almost finished support for 'map'

Currently it only supports vectors of lenght 4

14 years agoDo not apply eta expansion to application arguments.
Matthijs Kooijman [Tue, 23 Jun 2009 12:24:26 +0000 (14:24 +0200)]
Do not apply eta expansion to application arguments.

Doing this can introduce expressions such as:
  map (\x -> foo x) xs
which is of course not really what we want. By limiting eta expansion in
this way, we'll still get it where we really want it: At the top level.

14 years agoAdded builtin function 'empty'
Christiaan Baaij [Tue, 23 Jun 2009 11:45:22 +0000 (13:45 +0200)]
Added builtin function 'empty'