#39 closed task (fixed)

Prepare msim_m8a code model

Reported by: dsl Owned by: dsl
Priority: major Milestone: MCUSim-0.2
Component: avr Keywords: planned-in-0.2 codemodel xspice ngspice


A simulated version of ATmega8A microcontroller can be implemented as a code
model for XSPICE simulation engine (a part of NGSpice) to serve as a backend
for microcontrollers with in a simulated circuit.

The main idea is to adjust xspice/src/xspice/icm/mcusim/m8a/cfunc.mod and
xspice/src/xspice/icm/mcusim/m8a/ifspec.ifs to initialize and simulate an
instance of ATmega8A according to the input values of the ports B (PB7:PB0),
C (PC5:PC0) and D (PD7:PD0) and update output values.

A really good work has been done by Uros Platse from Isotel d.o.o. in an
implementation of the d_process code model.
Take a look at the attached files to understand how it's done.

NOTE: MCUSim can already be compiled as a code model library (mcusim.cm) using
these options:

$ make

Detailed explanation of the options can be found in the INSTALL file.

Attachments (2)

cfunc.mod (10.4 KB) - added by dsl 18 months ago.
ifspec.ifs (4.1 KB) - added by dsl 18 months ago.

Download all attachments as: .zip

Change History (5)

Changed 18 months ago by dsl

Attachment: cfunc.mod added

Changed 18 months ago by dsl

Attachment: ifspec.ifs added

comment:1 Changed 18 months ago by dsl

Milestone: MCUSim-0.2Work in Progress
Status: assignedaccepted

comment:2 Changed 17 months ago by dsl

It's done starting from 0.1.162. There is a room for improvements (including an analog port ADC0:7 to be added to the XSPICE model).

comment:3 Changed 17 months ago by dsl

Milestone: Work in ProgressMCUSim-0.2
Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.