[Haskell-cafe] ANN: powerpc-0.0.1

Serguey Zefirov sergueyz at gmail.com
Thu Mar 11 12:07:05 EST 2010


2010/3/11 John Van Enk <vanenkj at gmail.com>:
> Serguey,
> The system I'm writing has a type in place for the AVR instruction set. I'm
> working on writing an assembler/disassembler for it as well. It might make
> sense, if your employer deems it worthwhile to release the code, to
> collaborate.
> /jve

Our work is concerned with semantics of operations.

So we build a list of Commands:

data Command cpu = Command {
     cmdName :: String -- right now it's just a string, but it could
be a pretty printer
                                     -- with calculations for disasm.
    ,cmdFormat :: [Match cpu] -- when we decode a command in a simulation,
                                                -- we set some CPU variables.
                                                -- that's what Match encode.
    ,cmdStatements :: [Stat cpu] -- the semantics of command.
    }

And then we use that list to generate code for our simulation package.

Lately we found that we could use those command descriptions for other
purposes, like automatic code generator generators, etc, but we didn't
explored all that yet.

So we don't have a specific type of AVR commands. We have general
description of (almost) arbitrary CPU commands which we successfully
applied to AVR line of microcontroller cores.

Statements contains assignments (Variable cpu size := Expression cpu
size), conditionals and various CPU- and bus-specific function
invocation (like read from memory or write to it).

> On Thu, Mar 11, 2010 at 11:35 AM, Serguey Zefirov <sergueyz at gmail.com>
> wrote:
>>
>> 2010/3/11 John Van Enk <vanenkj at gmail.com>:
>> > Serguey,
>> > I'm working on a similar project. What's the chance you have your source
>> > code in the open?
>> > /jve
>>
>> I'll ask.
>>
>> But chances are pretty small.
>>
>> I'll think about reimplementing command description from scratch.
>>
>> > On Thu, Mar 11, 2010 at 7:30 AM, Serguey Zefirov <sergueyz at gmail.com>
>> > wrote:
>> >>
>> >> 2010/3/10 Tom Hawkins <tomahawkins at gmail.com>:
>> >> > On Wed, Mar 10, 2010 at 8:07 AM, Warren Henning
>> >> > <warren.henning at gmail.com> wrote:
>> >> >> Wow. Quite ambitious.
>> >> >>
>> >> >> Was this inspired by work at your current employer like with Atom
>> >> >> and
>> >> >> some of the other stuff you've released?
>> >> >
>> >> > Yes, we had an immediate need to debug some machine code.  I looked
>> >> > around, but all the emulators I found (PSIM, et al.) were too
>> >> > complicated.
>> >> >
>> >> > I'm also intrigued by the emphasis on software verification at the
>> >> > object code level for aerospace (DO-178).  I figure better tools in
>> >> > this area may open the door to using advanced design methods like
>> >> > Atom
>> >> > for avionics.  Of course it's unlikely this project will reach that
>> >> > level of maturity, but you never know.
>> >>
>> >> We wrote the debugger and simulator for AVR line of microcontroller
>> >> cores.
>> >>
>> >> We used a DSEL to describe inner workings of commands and now try to
>> >> apply it to ARM ISA.
>> >>
>> >> The Haskell code is heavy on the use of type-level computations and,
>> >> especially, assiciated types.
>> >> _______________________________________________
>> >> Haskell-Cafe mailing list
>> >> Haskell-Cafe at haskell.org
>> >> http://www.haskell.org/mailman/listinfo/haskell-cafe
>> >
>> >
>
>


More information about the Haskell-Cafe mailing list