Forums

How do I do combined verilog and spice simulations?

Started by Johann Klammer April 7, 2016
Has anybody tried this?
preferrably using something free(ngspice?)...
On Thu, 07 Apr 2016 17:36:28 +0200, Johann Klammer wrote:

> Has anybody tried this? > preferrably using something free(ngspice?)...
I don't know how, but if you figure it out let us know. I'd love to have a tool bench where I could bolt a general-purpose simulator like Simulink or XCos to a cycle-correct microprocessor simulation and let-er-rip. I suspect that the potential market is limited enough that if it is available it's $50,000 a seat from Mentor, and buggy as hell. -- www.wescottdesign.com
On Thu, 07 Apr 2016 11:18:17 -0500, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Thu, 07 Apr 2016 17:36:28 +0200, Johann Klammer wrote: > >> Has anybody tried this? >> preferrably using something free(ngspice?)... > >I don't know how, but if you figure it out let us know. > >I'd love to have a tool bench where I could bolt a general-purpose >simulator like Simulink or XCos to a cycle-correct microprocessor >simulation and let-er-rip. I suspect that the potential market is >limited enough that if it is available it's $50,000 a seat from Mentor, >and buggy as hell.
I know Cadence can do Verilog/VHDL + Analog in one swell foop... I'm sure the cost is prohibitive. PSpice and LTspice have built-in logic elements which only play with their own simulators. I have written a few digital primitives which play anywhere... see them on the Device Models & Subcircuits Page of my website. They are not up-to-date... I almost daily "evolve" my modeling techniques and haven't posted updates. I'm getting close to a simple "family" modeling technique... just call up an inverter symbol and label it 74HC and off you go ;-) ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
On Thu, 07 Apr 2016 09:29:24 -0700, Jim Thompson wrote:

> On Thu, 07 Apr 2016 11:18:17 -0500, Tim Wescott <tim@seemywebsite.com> > wrote: > >>On Thu, 07 Apr 2016 17:36:28 +0200, Johann Klammer wrote: >> >>> Has anybody tried this? >>> preferrably using something free(ngspice?)... >> >>I don't know how, but if you figure it out let us know. >> >>I'd love to have a tool bench where I could bolt a general-purpose >>simulator like Simulink or XCos to a cycle-correct microprocessor >>simulation and let-er-rip. I suspect that the potential market is >>limited enough that if it is available it's $50,000 a seat from Mentor, >>and buggy as hell. > > I know Cadence can do Verilog/VHDL + Analog in one swell foop... I'm > sure the cost is prohibitive. > > PSpice and LTspice have built-in logic elements which only play with > their own simulators. > > I have written a few digital primitives which play anywhere... see them > on the Device Models & Subcircuits Page of my website. > > They are not up-to-date... I almost daily "evolve" my modeling > techniques and haven't posted updates. > > I'm getting close to a simple "family" modeling technique... just call > up an inverter symbol and label it 74HC and off you go ;-) > > ...Jim Thompson
It would be nice, for switching supplies (or amplifiers) when there's digital logic or a microprocessor in the control loop, to be able to simulate the processor + algorithm easily. I've done fairly well by making a behavioral block in LTSpice whose output is a PWM signal or whatever, and implementing the rest as a circuit. It's generally something that gets used to verify that a plan is good enough to put on a circuit board, and then it's abandoned when the physical board is available. -- www.wescottdesign.com
On Thu, 07 Apr 2016 11:34:08 -0500, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Thu, 07 Apr 2016 09:29:24 -0700, Jim Thompson wrote: > >> On Thu, 07 Apr 2016 11:18:17 -0500, Tim Wescott <tim@seemywebsite.com> >> wrote: >> >>>On Thu, 07 Apr 2016 17:36:28 +0200, Johann Klammer wrote: >>> >>>> Has anybody tried this? >>>> preferrably using something free(ngspice?)... >>> >>>I don't know how, but if you figure it out let us know. >>> >>>I'd love to have a tool bench where I could bolt a general-purpose >>>simulator like Simulink or XCos to a cycle-correct microprocessor >>>simulation and let-er-rip. I suspect that the potential market is >>>limited enough that if it is available it's $50,000 a seat from Mentor, >>>and buggy as hell. >> >> I know Cadence can do Verilog/VHDL + Analog in one swell foop... I'm >> sure the cost is prohibitive. >> >> PSpice and LTspice have built-in logic elements which only play with >> their own simulators. >> >> I have written a few digital primitives which play anywhere... see them >> on the Device Models & Subcircuits Page of my website. >> >> They are not up-to-date... I almost daily "evolve" my modeling >> techniques and haven't posted updates. >> >> I'm getting close to a simple "family" modeling technique... just call >> up an inverter symbol and label it 74HC and off you go ;-) >> >> ...Jim Thompson > >It would be nice, for switching supplies (or amplifiers) when there's >digital logic or a microprocessor in the control loop, to be able to >simulate the processor + algorithm easily. > >I've done fairly well by making a behavioral block in LTSpice whose >output is a PWM signal or whatever, and implementing the rest as a >circuit. It's generally something that gets used to verify that a plan >is good enough to put on a circuit board, and then it's abandoned when >the physical board is available.
I haven't had any horrendously complex controllers to deal with... just periodic calibration systems, and such. I usually get by with a "table" logic controller. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance