matthijs/master-project/cλash.git
15 years agoRename letremove to letremovesimple.
Matthijs Kooijman [Fri, 14 Aug 2009 13:17:07 +0000 (15:17 +0200)]
Rename letremove to letremovesimple.

15 years agoDon't try to simplify nested lets.
Matthijs Kooijman [Fri, 14 Aug 2009 12:38:49 +0000 (14:38 +0200)]
Don't try to simplify nested lets.

This would cause loops with letflat (and possibly with itself as well).

15 years agoMake letflat work with non-recursive lets.
Matthijs Kooijman [Fri, 14 Aug 2009 12:38:11 +0000 (14:38 +0200)]
Make letflat work with non-recursive lets.

This replaces the implementation that worked with recursive lets, since
that is no longer needed.

15 years agoMake letsimpl work on and generate a non-recursive let.
Matthijs Kooijman [Fri, 14 Aug 2009 12:17:51 +0000 (14:17 +0200)]
Make letsimpl work on and generate a non-recursive let.

Previously, letsimpl would work on a recursive let only, and add a new
binding to that recursive let. Now, it works on any let and produces a new
non-recursive let.

15 years agoNo longer add a top level let before normalization.
Matthijs Kooijman [Fri, 14 Aug 2009 12:12:50 +0000 (14:12 +0200)]
No longer add a top level let before normalization.

This was previously required to ensure there was always a let on top
level. However, since we are using nonrecursive lets now and use a
splitNormalized instead of hard matching a Let constructor, there is no
need for an (empty) let at the top anymore.

15 years agoMake some normalizations generate nonrecursive lets.
Matthijs Kooijman [Fri, 14 Aug 2009 12:10:40 +0000 (14:10 +0200)]
Make some normalizations generate nonrecursive lets.

15 years agoMerge branch 'master' of git://github.com/christiaanb/clash into cλash
Matthijs Kooijman [Fri, 14 Aug 2009 12:02:50 +0000 (14:02 +0200)]
Merge branch 'master' of git://github.com/christiaanb/clash into cλash

* 'master' of git://github.com/christiaanb/clash:
  Hopefully generate completely unique varNames now (also for comp_ins labels)
  Generate more unique variable names, generate truely unique entity names
  Add boolean or and and, tuple fst and snd function.
  Added equals builtin. And fixed show function generation for integers
  Class Num is re-exported by CLasH.HardwareTypes, so no need to use the one in Prelude

15 years agoTurn let recursification into its opposite.
Matthijs Kooijman [Fri, 14 Aug 2009 12:00:45 +0000 (14:00 +0200)]
Turn let recursification into its opposite.

Instead of making all lets recursive, it now makes all lets nonrecursive,
wherever possible. This breaks normalization, since most other passes work
with recursive lets exclusively.

15 years agoBe more strict in state recognition.
Matthijs Kooijman [Fri, 14 Aug 2009 11:27:31 +0000 (13:27 +0200)]
Be more strict in state recognition.

Previously, any cast that involves a state variable, would be classified
as state (un)packing. Now, only do this if the cast actually changes a
variable from (packed) state to non state (e.g., unpacked state).

15 years agoHopefully generate completely unique varNames now (also for comp_ins labels)
Christiaan Baaij [Thu, 13 Aug 2009 16:03:30 +0000 (18:03 +0200)]
Hopefully generate completely unique varNames now (also for comp_ins labels)

15 years agoMerge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
Christiaan Baaij [Thu, 13 Aug 2009 15:20:33 +0000 (17:20 +0200)]
Merge branch 'cλash' of git.stderr.nl/matthijs/projects/master-project

* 'cλash' of http://git.stderr.nl/matthijs/projects/master-project:
  Don't generate a state proc for an empty state.
  Make splitNormalized work for non-recursive lets.
  Add and use splitNormalized helper function.

15 years agoGenerate more unique variable names, generate truely unique entity names
Christiaan Baaij [Thu, 13 Aug 2009 15:19:48 +0000 (17:19 +0200)]
Generate more unique variable names, generate truely unique entity names

15 years agoDon't generate a state proc for an empty state.
Matthijs Kooijman [Thu, 13 Aug 2009 14:40:43 +0000 (16:40 +0200)]
Don't generate a state proc for an empty state.

This can happen when a function has no state itself, but only substates.

15 years agoMake splitNormalized work for non-recursive lets.
Matthijs Kooijman [Thu, 13 Aug 2009 14:24:44 +0000 (16:24 +0200)]
Make splitNormalized work for non-recursive lets.

For now, normalized expressions can only contain a (single) recursive let,
but this should become nested non-recursive lets only in the future.

15 years agoAdd and use splitNormalized helper function.
Matthijs Kooijman [Thu, 13 Aug 2009 14:12:31 +0000 (16:12 +0200)]
Add and use splitNormalized helper function.

This function puts the matching of a normalized expression in a single
place instead of spread out over multiple places. This prevents some code
duplication and allows for better error reporting.

15 years agoAdd boolean or and and, tuple fst and snd function.
Christiaan Baaij [Thu, 13 Aug 2009 12:15:42 +0000 (14:15 +0200)]
Add boolean or and and, tuple fst and snd function.

And add reducer, which uses the above functions

15 years agoAdded equals builtin. And fixed show function generation for integers
Christiaan Baaij [Thu, 13 Aug 2009 09:25:04 +0000 (11:25 +0200)]
Added equals builtin. And fixed show function generation for integers

15 years agoClass Num is re-exported by CLasH.HardwareTypes, so no need to use the one in Prelude
Christiaan Baaij [Thu, 13 Aug 2009 07:55:33 +0000 (09:55 +0200)]
Class Num is re-exported by CLasH.HardwareTypes, so no need to use the one in Prelude

15 years agoRevert "Put mkAssocElems in the TranslatorSession."
Matthijs Kooijman [Wed, 12 Aug 2009 15:28:17 +0000 (17:28 +0200)]
Revert "Put mkAssocElems in the TranslatorSession."

This reverts commit 374a42ba3cf333ae53fa1d992620d25286641ae2.

Conflicts:

cλash/CLasH/VHDL/Testbench.hs
cλash/CLasH/VHDL/VHDLTools.hs

15 years agoRevert "Don't generate VHDL for state packing."
Matthijs Kooijman [Wed, 12 Aug 2009 15:17:51 +0000 (17:17 +0200)]
Revert "Don't generate VHDL for state packing."

This is now handled by the previous commit, which ensures mkConcSm (and
thus genApplication) don't even see state (un)packing bindings.

This reverts commit fda239f0ae8fc6a2250e6719c3f564c9b2390c4a.

15 years agoThrow away old and unused functions for state.
Matthijs Kooijman [Wed, 12 Aug 2009 15:16:07 +0000 (17:16 +0200)]
Throw away old and unused functions for state.

15 years agoGenerate a state proc for a stateful function.
Matthijs Kooijman [Wed, 12 Aug 2009 15:12:53 +0000 (17:12 +0200)]
Generate a state proc for a stateful function.

This means that stateful functions can now be succesfully compiled to some
extent (the Alu example only works without the simplifier).

15 years agoDon't inline register_bank.
Matthijs Kooijman [Wed, 12 Aug 2009 15:11:43 +0000 (17:11 +0200)]
Don't inline register_bank.

15 years agoOnly do State packing once in register_bank.
Matthijs Kooijman [Wed, 12 Aug 2009 15:09:41 +0000 (17:09 +0200)]
Only do State packing once in register_bank.

15 years agoImprove Normalize debug output.
Matthijs Kooijman [Wed, 12 Aug 2009 15:06:52 +0000 (17:06 +0200)]
Improve Normalize debug output.

15 years agoAdd isStateCon helper.
Matthijs Kooijman [Wed, 12 Aug 2009 14:14:50 +0000 (16:14 +0200)]
Add isStateCon helper.

15 years agoUse mkBinderFor instead of mkInternalVar.
Matthijs Kooijman [Wed, 12 Aug 2009 14:13:21 +0000 (16:13 +0200)]
Use mkBinderFor instead of mkInternalVar.

15 years agoAdd identical let binding merge normalization pass.
Matthijs Kooijman [Wed, 12 Aug 2009 14:09:41 +0000 (16:09 +0200)]
Add identical let binding merge normalization pass.

15 years agoAdd cast simplification normalization pass.
Matthijs Kooijman [Wed, 12 Aug 2009 13:08:02 +0000 (15:08 +0200)]
Add cast simplification normalization pass.

This ensures that the casts used for packing and unpacking State variables
only operate on simple variables.

15 years agoMake output ports optional.
Matthijs Kooijman [Wed, 12 Aug 2009 10:19:27 +0000 (12:19 +0200)]
Make output ports optional.

This makes the output port in an Entity of the Maybe Port type, so we can
leave out the output port (for example when its type is empty). This makes
the code a bit more robus in the face of empty types.

15 years agoFix more comments.
Matthijs Kooijman [Wed, 12 Aug 2009 09:05:48 +0000 (11:05 +0200)]
Fix more comments.

15 years agoFix comment.
Matthijs Kooijman [Wed, 12 Aug 2009 09:04:38 +0000 (11:04 +0200)]
Fix comment.

15 years agoFix haddock comments
Christiaan Baaij [Sat, 8 Aug 2009 11:21:17 +0000 (13:21 +0200)]
Fix haddock comments

15 years agoAdd support for translating designs defined over multiple modules
Christiaan Baaij [Fri, 7 Aug 2009 13:58:14 +0000 (15:58 +0200)]
Add support for translating designs defined over multiple modules

Have to test the stability, it works for HighOrdAlu

15 years agoHave reduceCoreListToHsList work with simplified modules
Christiaan Baaij [Fri, 7 Aug 2009 12:29:22 +0000 (14:29 +0200)]
Have reduceCoreListToHsList work with simplified modules

15 years agoWe now use compileToCoreSimplified, I'm sure there will be dragons
Christiaan Baaij [Fri, 7 Aug 2009 08:11:35 +0000 (10:11 +0200)]
We now use compileToCoreSimplified, I'm sure there will be dragons

15 years agoState newtype has been moved to CLasH.HardwareTypes
Christiaan Baaij [Fri, 7 Aug 2009 07:22:52 +0000 (09:22 +0200)]
State newtype has been moved to CLasH.HardwareTypes

15 years agoAlu.hs now uses the new CLasH.HardwareTypes
Christiaan Baaij [Fri, 7 Aug 2009 07:20:15 +0000 (09:20 +0200)]
Alu.hs now uses the new CLasH.HardwareTypes

15 years agoMerge branch 'master' of git://github.com/christiaanb/clash into cλash
Matthijs Kooijman [Thu, 6 Aug 2009 17:22:09 +0000 (19:22 +0200)]
Merge branch 'master' of git://github.com/christiaanb/clash into cλash

* 'master' of git://github.com/christiaanb/clash:
  Add the type-alias Vector for TFVec to HardwareTypes, and don't export TFVec.TFVec anymore
  Add the module hardware types, that exports all builtin types.
  Add new modules to cabal file

15 years agoRewrite Alu using the State newtype.
Matthijs Kooijman [Thu, 6 Aug 2009 17:21:17 +0000 (19:21 +0200)]
Rewrite Alu using the State newtype.

This is the way stateful functions will be working. Alu.hs now compiles,
but it does not result in valid (stateful) VHDL yet.

15 years agoFilter out empty-typed binders in selector cases.
Matthijs Kooijman [Thu, 6 Aug 2009 17:19:52 +0000 (19:19 +0200)]
Filter out empty-typed binders in selector cases.

This makes sure that the non-empty binders are skipped when calculating
the field number, which prevents overflow when indexing the field names.

15 years agoAdd hasNonEmptyType helper function.
Matthijs Kooijman [Thu, 6 Aug 2009 17:18:48 +0000 (19:18 +0200)]
Add hasNonEmptyType helper function.

15 years agoLet argsToVHDLExpr ignore empty types.
Matthijs Kooijman [Thu, 6 Aug 2009 17:09:11 +0000 (19:09 +0200)]
Let argsToVHDLExpr ignore empty types.

This makes sure that state arguments are not passed to called functions.

15 years agoGeneralize vhdl_ty to work an all TypedThings.
Matthijs Kooijman [Thu, 6 Aug 2009 17:08:22 +0000 (19:08 +0200)]
Generalize vhdl_ty to work an all TypedThings.

15 years agoAdd isJustM helper function.
Matthijs Kooijman [Thu, 6 Aug 2009 17:06:43 +0000 (19:06 +0200)]
Add isJustM helper function.

15 years agoRename eitherCoreOrExprArgs to argsToVHDLExprs.
Matthijs Kooijman [Thu, 6 Aug 2009 16:47:09 +0000 (18:47 +0200)]
Rename eitherCoreOrExprArgs to argsToVHDLExprs.

Also add a helper function to make it more readable.

15 years agoRemove the getType field name from OrdType.
Matthijs Kooijman [Thu, 6 Aug 2009 15:54:03 +0000 (17:54 +0200)]
Remove the getType field name from OrdType.

This conflicted with the getType method from TypedThing. The field label
was never used.

15 years agoPut mkAssocElems in the TranslatorSession.
Matthijs Kooijman [Thu, 6 Aug 2009 15:45:56 +0000 (17:45 +0200)]
Put mkAssocElems in the TranslatorSession.

15 years agoRemove unused mkAssocElemIndexed.
Matthijs Kooijman [Thu, 6 Aug 2009 15:43:40 +0000 (17:43 +0200)]
Remove unused mkAssocElemIndexed.

15 years agoDon't generate VHDL for substate extractor cases.
Matthijs Kooijman [Thu, 6 Aug 2009 15:40:25 +0000 (17:40 +0200)]
Don't generate VHDL for substate extractor cases.

15 years agoFix letremoveunused, it removed all used bindings.
Matthijs Kooijman [Thu, 6 Aug 2009 15:32:25 +0000 (17:32 +0200)]
Fix letremoveunused, it removed all used bindings.

15 years agoFix the trace output of normalized functions.
Matthijs Kooijman [Thu, 6 Aug 2009 15:21:49 +0000 (17:21 +0200)]
Fix the trace output of normalized functions.

Before, it would output the un-normalized version.

15 years agoFiltering out state arguments is no longer needed.
Matthijs Kooijman [Thu, 6 Aug 2009 15:13:54 +0000 (17:13 +0200)]
Filtering out state arguments is no longer needed.

Since State types generate empty VHDL types now, they will be filtered out
automatically.

15 years agoGenerate the empty type for State types.
Matthijs Kooijman [Thu, 6 Aug 2009 15:13:14 +0000 (17:13 +0200)]
Generate the empty type for State types.

15 years agoAllow explicit empty VHDL types using Maybe.
Matthijs Kooijman [Thu, 6 Aug 2009 15:08:25 +0000 (17:08 +0200)]
Allow explicit empty VHDL types using Maybe.

The VHDL type generating functions can now return "Nothing" to mean that an
empty type would be generated. There are still some spots (builtin
functions mostly) that should handle this more gracefully, but it works
for now. Only single-constructor zero-argument algebraic types generate
the empty type currently, e.g. ().

15 years agoDon't generate input ports for State arguments.
Matthijs Kooijman [Thu, 6 Aug 2009 14:21:32 +0000 (16:21 +0200)]
Don't generate input ports for State arguments.

15 years agoDon't generate VHDL for state packing.
Matthijs Kooijman [Thu, 6 Aug 2009 14:20:51 +0000 (16:20 +0200)]
Don't generate VHDL for state packing.

15 years agoAdd TypedThing class, and generalize hasStateType with it.
Matthijs Kooijman [Thu, 6 Aug 2009 14:15:20 +0000 (16:15 +0200)]
Add TypedThing class, and generalize hasStateType with it.

15 years agoAdd letremoveunused transformation.
Matthijs Kooijman [Thu, 6 Aug 2009 13:56:44 +0000 (15:56 +0200)]
Add letremoveunused transformation.

This transformation removes all unused let bindings.

15 years agoAdd changeif normalization helper function.
Matthijs Kooijman [Thu, 6 Aug 2009 13:56:23 +0000 (15:56 +0200)]
Add changeif normalization helper function.

15 years agoAdd expr_uses_binders predicate.
Matthijs Kooijman [Thu, 6 Aug 2009 13:56:04 +0000 (15:56 +0200)]
Add expr_uses_binders predicate.

15 years agoAdd {is,has}StateType predicates.
Matthijs Kooijman [Thu, 6 Aug 2009 13:55:43 +0000 (15:55 +0200)]
Add {is,has}StateType predicates.

15 years agoLet mkTupleShow support empty tuples.
Matthijs Kooijman [Thu, 6 Aug 2009 13:47:19 +0000 (15:47 +0200)]
Let mkTupleShow support empty tuples.

15 years agoAdd the type-alias Vector for TFVec to HardwareTypes, and don't export TFVec.TFVec...
Christiaan Baaij [Thu, 6 Aug 2009 13:02:40 +0000 (15:02 +0200)]
Add the type-alias Vector for TFVec to HardwareTypes, and don't export TFVec.TFVec anymore

15 years agoAdd the module hardware types, that exports all builtin types.
Christiaan Baaij [Thu, 6 Aug 2009 12:54:43 +0000 (14:54 +0200)]
Add the module hardware types, that exports all builtin types.

This way, users only have to import CLasH.HardwareTypes to get
access to all translatable hardware types.

15 years agoAdd new modules to cabal file
Christiaan Baaij [Thu, 6 Aug 2009 11:29:11 +0000 (13:29 +0200)]
Add new modules to cabal file

15 years agoRemove the unused "stateful" argument fomr makeVHDL*.
Matthijs Kooijman [Thu, 6 Aug 2009 10:06:32 +0000 (12:06 +0200)]
Remove the unused "stateful" argument fomr makeVHDL*.

State will be explicitely specified in the Haskell sources, so no reason
anymore to pass the statefulness of a function around.

15 years agoMerge branch 'master' of git://github.com/christiaanb/clash into cλash
Matthijs Kooijman [Wed, 5 Aug 2009 15:10:41 +0000 (17:10 +0200)]
Merge branch 'master' of git://github.com/christiaanb/clash into cλash

* 'master' of git://github.com/christiaanb/clash:
  Fix builtin functions (!),take and RangedWord

Conflicts:
cλash/CLasH/VHDL/Generate.hs

15 years agoRestructure the "finder" functions.
Matthijs Kooijman [Wed, 5 Aug 2009 15:04:48 +0000 (17:04 +0200)]
Restructure the "finder" functions.

Previously, there were three different functions for the top entity,
initial state and test input. Now, there is just a single one, which
guarantees that these things are properly linked together. This should no
also support generating multiple entities at the same time (though there
is no top level interface for this yet).

This change also makes the testbench generation optional. A bunch of
functions were moved from Utils to GhcTools, to prevent a dependency loop.

15 years agoAdd catMaybesM and concatM helper functions.
Matthijs Kooijman [Wed, 5 Aug 2009 15:04:06 +0000 (17:04 +0200)]
Add catMaybesM and concatM helper functions.

15 years agoUse the right id for the testbench architecture.
Matthijs Kooijman [Wed, 5 Aug 2009 15:00:47 +0000 (17:00 +0200)]
Use the right id for the testbench architecture.

15 years agoFix builtin functions (!),take and RangedWord
Christiaan Baaij [Wed, 5 Aug 2009 14:17:17 +0000 (16:17 +0200)]
Fix builtin functions (!),take and RangedWord

15 years agoFix testbench again.
Matthijs Kooijman [Wed, 5 Aug 2009 13:21:45 +0000 (15:21 +0200)]
Fix testbench again.

The testbench code has also been moved to a separate module.

15 years agoSplit of part of getNormalized into normalizeExpr.
Matthijs Kooijman [Wed, 5 Aug 2009 13:20:14 +0000 (15:20 +0200)]
Split of part of getNormalized into normalizeExpr.

15 years agoAdd unzipM helper function.
Matthijs Kooijman [Wed, 5 Aug 2009 12:51:53 +0000 (14:51 +0200)]
Add unzipM helper function.

15 years agoSlightly simplify getEntity.
Matthijs Kooijman [Wed, 5 Aug 2009 12:05:45 +0000 (14:05 +0200)]
Slightly simplify getEntity.

15 years agoMove around some helper functions.
Matthijs Kooijman [Wed, 5 Aug 2009 11:59:39 +0000 (13:59 +0200)]
Move around some helper functions.

This moves some stuff from NormalizeTools and NormalizeTypes into the
(new) BinderTools and TranslatorTypes. This also puts most of these
function in the TranslatorSession instead of the TransformMonad.

15 years agoRemove compatability aliases for the old sessions.
Matthijs Kooijman [Wed, 5 Aug 2009 10:36:38 +0000 (12:36 +0200)]
Remove compatability aliases for the old sessions.

15 years agoMake vhdl generation and normalization lazy.
Matthijs Kooijman [Wed, 5 Aug 2009 10:12:28 +0000 (12:12 +0200)]
Make vhdl generation and normalization lazy.

Previously, first all function would be (recursively) normalized, and then
VHDL would be generated. Now, functions are normalized when needed, and
recursion is done while generating VHDL (so we know exactly which
components we are instantiating).

This disables the testbench and TFVec constructor for now, I'll fix that
in the next commits.

This also moves some code around, to prevent loops between Generate and
VHDL (again...).

The VHDLSession and NormalizeSession have been removed, and replaced with
the (previously unused) TranslatorSession. There are a few backward
compatibility aliases in place, so the next commit will probably remove
these and do a bunch of trivial replaces all over the code.

15 years agoPut a comment on UniqSupply generation back.
Matthijs Kooijman [Mon, 3 Aug 2009 10:26:43 +0000 (12:26 +0200)]
Put a comment on UniqSupply generation back.

15 years agoMerge branch 'master' of git://github.com/christiaanb/clash into cλash
Matthijs Kooijman [Mon, 3 Aug 2009 10:20:29 +0000 (12:20 +0200)]
Merge branch 'master' of git://github.com/christiaanb/clash into cλash

* 'master' of git://github.com/christiaanb/clash:
  TFVec builtin should now completely work
  Clean up imports in Generate.hs
  Use createDirectoryIfMissing to create the vhdl directory, as it can create the parent directories too
  Reflect API changes of clash in clash-nolibdir
  Bring back listBind(ings) in Utils.hs by reorganising Translator.hs and GhcTools.hs
  Fix a few comments so Haddock will complete
  Further clean up Translator.hs (almost done now)
  Cleanup Translator.hs
  Fail again when we find a global function
  Partially fixed TFVec builtin function. Still needs to be verified

15 years agoTFVec builtin should now completely work
Christiaan Baaij [Mon, 3 Aug 2009 07:51:55 +0000 (09:51 +0200)]
TFVec builtin should now completely work

15 years agoClean up imports in Generate.hs
Christiaan Baaij [Sun, 2 Aug 2009 19:17:21 +0000 (21:17 +0200)]
Clean up imports in Generate.hs

15 years agoUse createDirectoryIfMissing to create the vhdl directory, as it can create the paren...
Christiaan Baaij [Sun, 2 Aug 2009 19:07:46 +0000 (21:07 +0200)]
Use createDirectoryIfMissing to create the vhdl directory, as it can create the parent directories too

15 years agoReflect API changes of clash in clash-nolibdir
Christiaan Baaij [Sun, 2 Aug 2009 18:51:29 +0000 (20:51 +0200)]
Reflect API changes of clash in clash-nolibdir

15 years agoBring back listBind(ings) in Utils.hs by reorganising Translator.hs and GhcTools.hs
Christiaan Baaij [Sat, 1 Aug 2009 18:41:19 +0000 (20:41 +0200)]
Bring back listBind(ings) in Utils.hs by reorganising Translator.hs and GhcTools.hs

15 years agoFix a few comments so Haddock will complete
Christiaan Baaij [Fri, 31 Jul 2009 19:01:02 +0000 (21:01 +0200)]
Fix a few comments so Haddock will complete

15 years agoFurther clean up Translator.hs (almost done now)
Christiaan Baaij [Fri, 31 Jul 2009 18:46:17 +0000 (20:46 +0200)]
Further clean up Translator.hs (almost done now)

15 years agoCleanup Translator.hs
Christiaan Baaij [Fri, 31 Jul 2009 15:17:04 +0000 (17:17 +0200)]
Cleanup Translator.hs

Can be reduced in size even more by parameterizing the findcore functions
to work for both strings and annotations

15 years agoFail again when we find a global function
Christiaan Baaij [Fri, 31 Jul 2009 15:15:54 +0000 (17:15 +0200)]
Fail again when we find a global function

Was only disabled to fix the builtin TFVec function

15 years agoPartially fixed TFVec builtin function. Still needs to be verified
Christiaan Baaij [Fri, 31 Jul 2009 13:21:02 +0000 (15:21 +0200)]
Partially fixed TFVec builtin function. Still needs to be verified

15 years agoMerge casevalsimpl and casewild into casesimpl.
Matthijs Kooijman [Fri, 31 Jul 2009 12:34:34 +0000 (14:34 +0200)]
Merge casevalsimpl and casewild into casesimpl.

Both transformations had a very similar structure, which are now merged.

15 years agoFix a small bug in the case wildening.
Matthijs Kooijman [Fri, 31 Jul 2009 11:04:05 +0000 (13:04 +0200)]
Fix a small bug in the case wildening.

This bug could be triggered when the scrutinee was a datatype containing a
non-representable value. This is probably not translatable, but handle it
properly anyway.

15 years agoPrevent conflicts with inlinenonrep in normalization.
Matthijs Kooijman [Fri, 31 Jul 2009 10:37:08 +0000 (12:37 +0200)]
Prevent conflicts with inlinenonrep in normalization.

This is a followup on
ebdc2024d7cf71: Let inlinefun inline everything non-representable.
which make inlinefun more general. A few other normalizations tried to
prevent loops with inline fun, but now work correctly for the (new)
inlinenonrep.

15 years agoMerge branch 'master' of git://github.com/christiaanb/clash into cλash
Matthijs Kooijman [Fri, 31 Jul 2009 09:26:59 +0000 (11:26 +0200)]
Merge branch 'master' of git://github.com/christiaanb/clash into cλash

* 'master' of git://github.com/christiaanb/clash:
  Quick hack implementation of FSVec literals, needs to be fixed
  We need the latest vhdl package
  We now make a show function for all default datatypes.
  Add automated testbench generation according to supplied test input

Conflicts:
cλash/CLasH/Translator.hs

15 years agoQuick hack implementation of FSVec literals, needs to be fixed
Christiaan Baaij [Fri, 31 Jul 2009 07:19:57 +0000 (09:19 +0200)]
Quick hack implementation of FSVec literals, needs to be fixed

15 years agoWe need the latest vhdl package
Christiaan Baaij [Wed, 29 Jul 2009 12:08:54 +0000 (14:08 +0200)]
We need the latest vhdl package

15 years agoWe now make a show function for all default datatypes.
Christiaan Baaij [Wed, 29 Jul 2009 12:01:41 +0000 (14:01 +0200)]
We now make a show function for all default datatypes.

We need to figure out how to show custom datatypes in VHDL, for that
we will need a string representation for each constructor.

15 years agoAdd automated testbench generation according to supplied test input
Christiaan Baaij [Tue, 28 Jul 2009 14:52:18 +0000 (16:52 +0200)]
Add automated testbench generation according to supplied test input

Will not compile in VHDL yet as we need to implement the VHDL show method first

15 years agoShow type of binder in listBinding.
Matthijs Kooijman [Tue, 28 Jul 2009 13:40:41 +0000 (15:40 +0200)]
Show type of binder in listBinding.