projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63b8956
)
Fix vhdl type generation of index type, as upper bound is now exclusive
author
christiaanb
<christiaan.baaij@gmail.com>
Thu, 17 Jun 2010 08:26:44 +0000
(10:26 +0200)
committer
christiaanb
<christiaan.baaij@gmail.com>
Thu, 17 Jun 2010 08:26:44 +0000
(10:26 +0200)
clash/CLasH/VHDL/VHDLTools.hs
patch
|
blob
|
history
diff --git
a/clash/CLasH/VHDL/VHDLTools.hs
b/clash/CLasH/VHDL/VHDLTools.hs
index a70036ef33b56ff60816390b43505b7f7fcb6e77..8cb2f5e5881ebf022d91dd829de2707f2d0ebe7f 100644
(file)
--- a/
clash/CLasH/VHDL/VHDLTools.hs
+++ b/
clash/CLasH/VHDL/VHDLTools.hs
@@
-346,7
+346,8
@@
mkHTypeEither' ty | ty_has_free_tyvars ty = return $ Left $ "\nVHDLTools.mkHType
return $ Right $ SizedIType len
"Index" -> do
bound <- tfp_to_int (ranged_word_bound_ty ty)
- return $ Right $ RangedWType bound
+ -- Upperbound is exclusive, hence the -1
+ return $ Right $ RangedWType (bound - 1)
otherwise ->
mkTyConHType tycon args
Nothing -> return $ Left $ "\nVHDLTools.mkHTypeEither': Do not know what to do with type: " ++ pprString ty