Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in DEC transformation throws CLaSH into an endless loop #140

Closed
christiaanb opened this issue Apr 4, 2016 · 0 comments
Closed

Bug in DEC transformation throws CLaSH into an endless loop #140

christiaanb opened this issue Apr 4, 2016 · 0 comments
Labels

Comments

@christiaanb
Copy link
Member

The following code:

module Loopbug where

import CLaSH.Prelude

type FPM    = SFixed 5 0 

valC                            = 1 :: FPM

valB                            = 2.0 :: FPM -- doesn't work
-- valB                         = 2 :: FPM -- works


-- loopBug :: FPM -> (FPM,FPM)
loopBug valA                    = (o1, o2)
    where
        (o1,o2)         | valA < 0 = (-valC, valA+valB)
                        -- | otherwise = (valC, ((-valB)+valA))   -- works        
                        | otherwise = (valC, (valA-valB))       -- doesn't work


topEntity = loopBug

Throws CLaSH into a loop due to a bug in the DEC transformation.

@christiaanb christiaanb added the bug label Apr 4, 2016
christiaanb added a commit that referenced this issue Sep 6, 2018
So instead of mapping `Bit` to

VHDL: `std_logic_vector(0 downto 0)`
Verilog: `wire [0:0]`

We map `Bit` to:

VHDL: `std_logic`
Verilog: `wire`
christiaanb added a commit that referenced this issue Sep 6, 2018
leonschoorl pushed a commit that referenced this issue Jul 31, 2023
Different processing elements might need different (amounts of)
components. This change lets each PE initialise the components on a
per-need basis.

This also reworks some of the build-system aspects of the firmware code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant