develooper Front page | perl.beginners | Postings from February 2002

Re: translation of logical operators

Thread Previous
Jonathan E. Paton
February 2, 2002 05:15
Re: translation of logical operators
Message ID:
--- Filson <> wrote:

> Dear perl mongers. I need to know if I can translate
> symbols in a text file into logical operators like
> AND|OR|NOT and so forth. The thing is that I'm trying to
> build a simulator for digital cuircuts, with input files
> in 3DML style (ascii graphix style) like this:
> =A-N>
> =O>
> >A-

etc etc


There is many ways to approach this issue, but you really
need to consider how you are going to deal with sequential
logic?  And what about outputs directly joined together?

The first will be a limitation of your simulator unless you
deal with it - probably by inducing a step delay mechanism.

You need to read up on parsing methods, and work out how
you would parse your input.  This builds a datastructure
containing the circuit you wish to simulate... then the
similulator works solely on this datastructure - not
refering back to the original file.

Honestly, unless this is a project then you should be
looking for existing digital simulators.

Jonathan Paton

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About