Comments (4)
@BFH-ktt1: Could you have a look, as you implemented this?
from logisim-evolution.
It seems the patch I suggested isn't enough, as a cpu I designed (which works in Logisim and doesn't use any gated clocks as well) only works on an FPGA with the following patch which removes the output register s_ramdataOut
when the RAM is set to line enables:
@@ -44,8 +44,10 @@ public class RamHdlGeneratorFactory extends AbstractHdlGeneratorFactory {
final var async = StdAttr.TRIG_HIGH.equals(trigger) || StdAttr.TRIG_LOW.equals(trigger);
final var ramEntries = (1 << nrOfaddressLines);
final var truncated = (nrOfBits % 8) != 0;
+ if (byteEnables) {
+ myWires.addWire("s_ramdataOut", nrOfBits);
+ }
myWires
- .addWire("s_ramdataOut", nrOfBits)
.addRegister("s_tickDelayLine", 3)
.addRegister("s_dataInReg", nrOfBits)
.addRegister("s_addressReg", nrOfaddressLines)
@@ -120,9 +119,11 @@ public class RamHdlGeneratorFactory extends AbstractHdlGeneratorFactory {
inputRegs : {{process}}({{clock}}, {{tick}}, address, dataIn, we, oe) {{is}}
{{begin}}
{{if}} (rising_edge({{clock}})) {{then}}
+ {{if}} ({{tick}} = '0') {{then}}
+ s_addressReg <= address;
+ {{end}} {{if}};
{{if}} ({{tick}} = '1') {{then}}
s_dataInReg <= dataIn;
- s_addressReg <= address;
s_weReg <= we;
s_oeReg <= oe;
""");
@@ -182,7 +183,7 @@ public class RamHdlGeneratorFactory extends AbstractHdlGeneratorFactory {
{{if}} (s_we = '1') {{then}}
s_memContents(to_integer(unsigned(s_addressReg))) <= s_dataInReg;
{{end}} {{if}};
- s_ramdataOut <= s_memContents(to_integer(unsigned(s_addressReg)));
+ dataOut <= s_memContents(to_integer(unsigned(s_addressReg)));
{{end}} {{if}};
{{end}} {{process}} mem;
""");
@@ -206,18 +207,6 @@ public class RamHdlGeneratorFactory extends AbstractHdlGeneratorFactory {
.add(" {{end}} {{if}};")
.add("{{end}} {{process}} res{{1}};", i);
}
- } else {
- contents
- .add("""
- res : {{process}}({{clock}}, s_oe, s_ramdataOut) {{is}}
- {{begin}}
- {{if}} (rising_edge({{clock}})) {{then}}
- {{if}} (s_oe = '1') {{then}}
- dataOut <= s_ramdataOut;
- {{end}} {{if}};
- {{end}} {{if}};
- {{end}} {{process}} res;
- """);
}
}
return contents.empty();
But again, I have no idea what I'm doing as I don't really understand the generated VHDL code, so I would appreciate help.
from logisim-evolution.
How'd you manage to use RAM? I thought it wasn't FPGA-supported
Please tell me how did you manage to do that
from logisim-evolution.
Related Issues (20)
- Do/Un-Do/Re-Do not positioning properly HOT 4
- Java logo on subwindows
- Simulation Halted by Internal Error VHDL HOT 5
- Add a writable EEPROM with persistent data capability HOT 6
- Feature Request: ROM data width > 64 Bits HOT 1
- AppImage HOT 1
- All Gates - Red Output HOT 4
- wont save circuit after cancel HOT 4
- Shortcuts not working on Linux OpenSUSE and French keyboard HOT 1
- Maximum RAM address bit width unclear HOT 1
- Add a way to hide navigation bar
- Double warning message
- Combinational analysis malfunction in version 3.8 HOT 3
- Custom wire colors / multi-wire selecting HOT 1
- Nightly build failed for Mac HOT 6
- User interface is too bright HOT 1
- No X11 DISPLAY variable was set - Wayland HOT 2
- Simulation halted by internal error when generating timing diagram HOT 4
- Debian build and Linux release value HOT 4
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 logisim-evolution.