Comments (5)
Hi @scted,
This sounds like a Migen issue, not something that is specific to symbiflow-examples? Migen issues can be reported as https://github.com/m-labs/migen
Thanks,
Tim @mithro Ansell
A Python toolbox for building complex digital hardware - m-labs/migen
from f4pga-examples.
almost certainly migen ... was told to report anything remotely related to the examples (using the migen installed by the examples) here but will also post on m-labs
from f4pga-examples.
@mithro FYI ... m-labs/migen#228
real issue with a workaround ... which is to assign the Cat object to an intermediate signal of equal size and then slice the intermediate signal
do you know anything about ghdl? ... "Is this any good? https://github.com/ghdl/ghdl-yosys-plugin"
m-labs think emitting vhdl would be better ... seems like verilog may be difficult and errorprone
do i close this issue here or do you? #githubrookie
VHDL synthesis (based on ghdl). Contribute to ghdl/ghdl-yosys-plugin development by creating an account on GitHub.
from f4pga-examples.
Hi @scted I did some a fast check how your example behaves in nMigen. Had to tweak the code a little to be nMigen compliant:
from nmigen import *
from nmigen.back import verilog
class TestRHSCat(Elaboratable):
def __init__(self):
self.ins = Signal(2)
self.outs = Signal(2)
self.s0 = Signal()
self.s1 = Signal()
def elaborate(self, platform):
m = Module()
#Cat_object of interest
cat_bus = Cat(self.s0, self.s1)
m.d.comb += cat_bus.eq(self.ins)
#using using slices of cat_bus
m.d.comb += self.outs[0].eq(cat_bus[0])
m.d.comb += self.outs[1].eq(cat_bus[1])
return m
if __name__ == "__main__":
rhscat = TestRHSCat()
print(verilog.convert(rhscat, ports=[rhscat.ins, rhscat.outs]))
And I got the following Verilog:
/* Generated by Yosys 0.9+3667 (git sha1 e7f36d01, clang 10.0.0 -fPIC -Os) */
(* \nmigen.hierarchy = "top" *)
(* top = 1 *)
(* generator = "nMigen" *)
module top(outs, ins);
(* src = "ntest.py:7" *)
input [1:0] ins;
(* src = "ntest.py:8" *)
output [1:0] outs;
(* src = "ntest.py:10" *)
wire s0;
(* src = "ntest.py:11" *)
wire s1;
assign outs[1] = s1;
assign outs[0] = s0;
assign { s1, s0 } = ins;
endmodule
The generated Verilog is much simpler than the one from migen. Also, it looks correct - slicing worked fine here.
from f4pga-examples.
@kgugala ... cool ... might give nMigen a try and see what i can break:) ... interesting that Yosys is generating the code.
from f4pga-examples.
Related Issues (20)
- Typedef Enum Width Default to one bit HOT 6
- Localparam not working properly HOT 4
- Signal not in Net List with one bit wires HOT 3
- Unable to handle Shift with Ternary operator HOT 6
- Array does not work with integers HOT 6
- Codebreaker Lab Failure HOT 6
- Switch to using openFPGALoader as the default tool to upload bitstreams to xc7 devices
- JTAG init failed with: unable to open ftdi device HOT 2
- What happened to the LiteX Linux and LiteX SATA demos? HOT 1
- make: f4pga: No such file or directory make: *** [Makefile:10: build] Error 127 HOT 3
- Built in gates cannot take multi-bit signal (Surelog) HOT 4
- It is very hard to find the design / example list now HOT 6
- add support for xc7a50tfgg484-1
- Update litex_demo to use F4PGA flow and current LiteX
- PicoSoC demo does not work out of the box HOT 3
- The final installation command is very easy to mess up HOT 2
- Update README files of xc7/Example-Projects to add instructions for removing the generated files produced during the build process.
- linux_litex_demo VexRiscv_Linux.v needed by arty_35/top.eblif
- btn_counter on Arty a7?
- litex_demo top.bit not found
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 f4pga-examples.