Comments (4)
It seems clash is smart enough to handle the reverse:
topEntity :: Bool -> Bool
topEntity result = result
{-# ANN topEntity
((defSyn "topEntity") { t_inputs = [PortName "result"] }
) #-}
entity topEntity is
port(result : in boolean;
result_0 : out boolean);
end;
from clash-compiler.
Instead of trying to be smart about this, maybe we should simple check port names for uniqueness and report an error when they're not unique.
That'll also help users who accidentally use the same port name multiple times.
Because right now clash happily accept:
topEntity :: Bool -> Bool
topEntity x = x
{-# ANN topEntity
((defSyn "topEntity") { t_inputs = [PortName "foo"], t_output = PortName "foo" }
) #-}
and generate invalid HDL
entity topEntity is
port(foo : in boolean;
foo : out boolean);
end;
from clash-compiler.
Duplicate of #2246 ?
from clash-compiler.
Basically yes, with the addition of #2528 (comment)
from clash-compiler.
Related Issues (20)
- Incorrect handling of diffferential clock pairs HOT 19
- Template Haskell code is run twice on GHC 9.4 and higher HOT 1
- Use newtypes for Clash number types on GHC 9.4+ HOT 2
- Clash sometimes duplicates clockWizard HOT 1
- Tutorial: some MAC's alternative specifications don't fit in its topEntity type signature HOT 1
- Expose `Clash.Class.Counter` methods HOT 9
- None of my code ends up in the synthesized Verilog output HOT 3
- VIO causes failure in `Clash.Netlist.BlackBox` HOT 2
- `IntegralTB` test fails with the SystemVerilog+Modelsim combination HOT 1
- PrimitiveGuard warnings are duplicated HOT 1
- BlackBoxHaskell blackboxes don't warn about potential primitive problems
- Clock primitive is duplicated HOT 4
- ILA ignores custom BitPack instances HOT 6
- Warn about out-of-range constants HOT 1
- Optimization flags are incompatible with the byte-code interpreter
- Bug: HDL generation failure with GHC 9.0.2, multiple hidden, synthesis attribute HOT 3
- Can't put synthesis attribute on output tuple
- Name duplication in generated Verilog for ClockWizard testbench HOT 3
- clash-lib doctest errors with GHC 9.4 on Debian HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clash-compiler.