Comments (2)
Hi,
The idea is that you will always have parameter to diferenciate the plugins of the same type (would not make sense to have two identical plugin doing the same thing).
Here is what i do in Vexii :
object TestStreamUnion extends App {
SpinalVerilog {
val c = new Component {
val host = new PluginHost
}
c.host.asHostOf(new PluginX("miaou"), new PluginX("wuff"))
c
}
}
class PluginX(someParameter : String) extends FiberPlugin {
withPrefix(someParameter) // <---- here is our saviour
def myID: Int = ???
val logic = during build new Area {
val o = out(Bool())
val myFsm = new StateMachine {
val init = new State with EntryPoint {
o := True
}
}
}
}
from spinalhdl.
Yes this makes a lot of sense, I didn't know about withPrefix
. Thanks!
from spinalhdl.
Related Issues (20)
- When to override `clone`? HOT 7
- How to use Union in IO port HOT 1
- `assignDontCare` on Bundle element inside Union does not work HOT 14
- `Union` elements cannot be accessed inside SpinalSim properly HOT 1
- [question] Trying to understand simulator wait apis (newbie) HOT 3
- SimMutex locked repeatly crashes the simulation HOT 5
- Checking for unknown values in simulation HOT 1
- JTAG VPI Simulation gets blocked by IO HOT 2
- Dump ports of `Mem` in FST waveforms? HOT 3
- HDElkDiagram generated html could not be convert ed to image using wkhtmltoimage correctly HOT 1
- Qsysify and Axi4: incorrect _hw.tcl generation HOT 1
- Could not load XSI simulation shared library HOT 1
- Blackboxing RAM with one read and one readWrite port HOT 2
- Performance of PriorityMux HOT 18
- Redundant Flow API Calls. HOT 4
- Parallel test execution in SpinalSim? HOT 5
- Are there some bugs in clockDomain.waitSampling() API? HOT 10
- Is there a "DONT_TOUCH" attribute for Components in Spinal ? HOT 2
- Unknown reason for hierarchy violation 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 spinalhdl.