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

Port name clashes with signal name #476

Closed
gergoerdi opened this issue Jan 25, 2019 · 1 comment
Closed

Port name clashes with signal name #476

gergoerdi opened this issue Jan 25, 2019 · 1 comment
Labels

Comments

@gergoerdi
Copy link
Contributor

CLaSH version: 949a05a

The following CLaSH source code produces no scoping errors from clash:

import Clash.Prelude

{-# NOINLINE topEntity #-}
{-# ANN topEntity
  (Synthesize
    { t_name   = "Bug"
    , t_inputs =
          [ PortName "CLK_50MHZ"
          , PortName "RESET"
          ]
    , t_output = PortName "LED"
    }) #-}
topEntity
    :: Clock System Source
    -> Reset System Asynchronous
    -> Signal System Bit
topEntity = exposeClockReset board
  where
    board = boolToBit <$> led
    led = register True $ complement <$> led

However, the VHDL generated from it has a name clash between the port name LED and the code generated for the locally bound variable led.

@gergoerdi
Copy link
Contributor Author

Yes, ha ha, name clash, let's get this out of the way quickly :)

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

2 participants