Language(s) for Microprograms ? 
Author Message
 Language(s) for Microprograms ?

How do people write microprograms?

Suppose I want to give a microprogram code of a controller as input

to a simulation program, say, working on a Verilog or VHDL description

without a ROM to store it. Suppose, I provide the names of all the control

signals that a controller generates. I also have all the condition flag names.

I want to allow the user to write a microprogram (a long one) say for

something like that of Intel 80286 into a file and provide as the input to this

simulation/analysis tool.

Is there a language or a format that people especially in the industry,  use

to describe microprograms along with the signals it works on/for ?

Please note, I am talking of microprograms and am not confusing myself about

this with assembly programs. I am talking of microcode. The hppa architects

talk of millicode. Can someone elaborate on that as well? What is a millicode

exactly? I once heard an hp VP for something, give a seminar on hppa and

their innovation called millicode.

The point is that I want to allow a user to provide microprograms for

a sequencer as input to an analysis tool, without him having to 'burn' it into

a ROM (software emulation of a ROM - to be precise) in terms of 0's and 1's.

Such code could be new numerical algorithms for function generation, general

controller sequencing for a complex instruction set with some complex modes

of memory addressing, or whatever.

Digression : Is it true that DEC system 10 used to keep its microprograms

on the DISK rather than a ROM? Did any of the mainframes and super minis of the

70s do this? Just curious.

By the by, how are ROMS modeled in Verilog and VHDL for simulation purposes?

Verilog has Register variables  reg [MSB:LSB] MEM[High:Low] to model a RAM.

But how do I model a ROM. Make it READ-ONLY or WRITE-ONCE, or ELECTRICALLY

ERASABLE PROM ? For Simulation purposes ? What do people generally do? How

about in VHDL ? (Me dont know VHDL enuf but can figure out)

Thanks
Sitaram

As I do not read all the newsgroups I am posting to (I scan most of them but
not all) please also e-mail to me if possible. Just include my e-mail in the
Carbon Copy Cc. Thanks.
################################################################################
Sitaram Yadavalli
Dept. of electrical and computer engineering
University of Iowa,
Iowa City, IA 52242.

################################################################################



Fri, 10 Jan 1997 16:11:54 GMT  
 Language(s) for Microprograms ?
How do people write microprograms?

Suppose I want to give a microprogram code of a controller as input

to a simulation program, say, working on a Verilog or VHDL description

without a ROM to store it. Suppose, I provide the names of all the control

signals that a controller generates. I also have all the condition flag names.

I want to allow the user to write a microprogram (a long one) say for

something like that of Intel 80286 into a file and provide as the input to this

simulation/analysis tool.

Is there a language or a format that people especially in the industry,  use

to describe microprograms along with the signals it works on/for ?

Please note, I am talking of microprograms and am not confusing myself about

this with assembly programs. I am talking of microcode. The hppa architects

talk of millicode. Can someone elaborate on that as well? What is a millicode

exactly? I once heard an hp VP for something, give a seminar on hppa and

their innovation called millicode.

The point is that I want to allow a user to provide microprograms for

a sequencer as input to an analysis tool, without him having to 'burn' it into

a ROM (software emulation of a ROM - to be precise) in terms of 0's and 1's.

Such code could be new numerical algorithms for function generation, general

controller sequencing for a complex instruction set with some complex modes

of memory addressing, or whatever.

Digression : Is it true that DEC system 10 used to keep its microprograms

on the DISK rather than a ROM? Did any of the mainframes and super minis of the

70s do this? Just curious.

By the by, how are ROMS modeled in Verilog and VHDL for simulation purposes?

Verilog has Register variables  reg [MSB:LSB] MEM[High:Low] to model a RAM.

But how do I model a ROM. Make it READ-ONLY or WRITE-ONCE, or ELECTRICALLY

ERASABLE PROM ? For Simulation purposes ? What do people generally do? How

about in VHDL ? (Me dont know VHDL enuf but can figure out)

Thanks
Sitaram

As I do not read all the newsgroups I am posting to (I scan most of them but
not all) please also e-mail to me if possible. Just include my e-mail in the
Carbon Copy Cc. Thanks.
################################################################################
Sitaram Yadavalli
Dept. of electrical and computer engineering
University of Iowa,
Iowa City, IA 52242.

################################################################################



Fri, 10 Jan 1997 16:23:03 GMT  
 Language(s) for Microprograms ?

Quote:

>How do people write microprograms?

The Xerox Alto had an assembler for its writeable microcode.  Clinton
Parker & I developed a compiler for a C-like language into this
microcode.  We compiled the inner loops of a sophisticated in-core
editor ('Flash') which did on-the-fly text compression/decompression
so that only what was shown on the screen was uncompressed (the
machine had only 128K bytes of RAM).  We also compiled the inner loops
of game-playing programs.

The MIT Lisp Machine had a high-level 'assember' with Lisp syntax (of
course) for its microcode.  Richard Greenblatt developed a compiler for
Lisp directly into microcode.

The entire Multiflow project could be considered as a project to
compile directly into microcode, but with a microcode which was
designed for the purpose.  More modern multiple-issue machines do
essentially the same things.



Sat, 11 Jan 1997 00:35:16 GMT  
 Language(s) for Microprograms ?
There is no standard microcode format. There are many ways of applying stimulus
to a model. I've used (in order of ease of development):

1) Write tasks in verilog and invoke them in a script.

This is probably the easiest to write initially, but is not reactive, that is,
it can't change its thread based on the results of the test.

2) Build queues and load them with entries.

This works well if you have a fairly well defined separation between control
and data in your model.

3) Build a CPU and write code.

It doesn't have to be a complex CPU, just enough to run the code you need. I typically
will choose a subset of the instruction set that is sufficient for writing tests
in C, so I don't need to write a compiler.

4) Build Markov chains as reactive stimulus.

A sort of unified stimulus - check approach. Each arc is determined by something
that is received or something that is sent. This is an interesting way of solving
the distributed state machine verification problem.

I'm sure there are more . . . You just have to find one that's right for your
requirements ( which vary wildly ).

                                                        John Williams



Sat, 11 Jan 1997 08:58:15 GMT  
 Language(s) for Microprograms ?

Quote:


> >How do people write microprograms?

> The Xerox Alto had an assembler for its writeable microcode.  Clinton
> Parker & I developed a compiler for a C-like language into this
> microcode.  We compiled the inner loops of a sophisticated in-core
> editor ('Flash') which did on-the-fly text compression/decompression
> so that only what was shown on the screen was uncompressed (the
> machine had only 128K bytes of RAM).  We also compiled the inner loops
> of game-playing programs.

> The MIT Lisp Machine had a high-level 'assember' with Lisp syntax (of
> course) for its microcode.  Richard Greenblatt developed a compiler for
> Lisp directly into microcode.

> The entire Multiflow project could be considered as a project to
> compile directly into microcode, but with a microcode which was
> designed for the purpose.  More modern multiple-issue machines do
> essentially the same things.

Also check out Koopman's articles on WISC (writeable instruction set
computers) where the microcode is user-programmable.
--
Julian V. Noble



Sun, 12 Jan 1997 09:24:03 GMT  
 Language(s) for Microprograms ?

: > >How do people write microprograms?
: >

You might check out a series of proceedings from the ACM's Annual
Microprogramming Workshop. They might be a little hard to find, since
the workshops are no longer held. The information may be a bit dated,
but we were beginning to see the introduction of C-like languages
for microprogramming in the early eighties when I was involved (I
presented a paper at the 14th workshop in '81). Possibly, these are
available from IEEE as well, since the workshops were done jointly with
IEEE TC-MICRO. But a technical library is where I would start my search.

-Ken
--
Ken Greenberg     |     The trouble with running your own

Los Gatos, CA     |     ARE those of your company....



Mon, 13 Jan 1997 00:34:11 GMT  
 Language(s) for Microprograms ?

Quote:
> You might check out a series of proceedings from the ACM's Annual
> Microprogramming Workshop. They might be a little hard to find, since
> the workshops are no longer held. The information may be a bit dated,
> but we were beginning to see the introduction of C-like languages
> for microprogramming in the early eighties when I was involved (I

Yes, one could say that the microcode was so good they decided to throw
away the CISC assembly code and use a cache instead of a control store.

                                                John Williams



Tue, 14 Jan 1997 15:49:51 GMT  
 Language(s) for Microprograms ?
Quote:


>: > >How do people write microprograms?
>: >

>You might check out a series of proceedings from the ACM's Annual
>Microprogramming Workshop. They might be a little hard to find, since
>the workshops are no longer held. The information may be a bit dated,

                   ^^^^^^^^^^^^^^

No, they are still being held but the focus has changed. MICRO-26 was
held in Austin, TX in Dec. 93.

Quote:
>but we were beginning to see the introduction of C-like languages
>for microprogramming in the early eighties when I was involved (I
>presented a paper at the 14th workshop in '81). Possibly, these are

                          ^^^^^^^^^^^^^^^^^^^^
--
Fatih Ugurdag
Case Western Reserve University


Tue, 14 Jan 1997 19:42:46 GMT  
 Language(s) for Microprograms ?

: : > >How do people write microprograms?
: : >

: You might check out a series of proceedings from the ACM's Annual
: Microprogramming Workshop. They might be a little hard to find, since
: the workshops are no longer held. The information may be a bit dated,
: but we were beginning to see the introduction of C-like languages
: for microprogramming in the early eighties when I was involved (I
: presented a paper at the 14th workshop in '81). Possibly, these are
: available from IEEE as well, since the workshops were done jointly with
: IEEE TC-MICRO. But a technical library is where I would start my search.

? Didn't they just rename the conference to a Microarchitecture
Workshop ... perhaps that has stopped as well now.

--
David Shepherd, INMOS ltd, 1000 Aztec West, Almonmdsbury, Bristol BS12 4SQ

tel:    +44 (0)454 611 625
[n.b. this message from account at SRF/PACT - please email to inmos.co.uk]



Tue, 14 Jan 1997 17:16:55 GMT  
 Language(s) for Microprograms ?



|> >: > >How do people write microprograms?
|> >: >
|> >
|> >You might check out a series of proceedings from the ACM's Annual
|> >Microprogramming Workshop. They might be a little hard to find, since
|> >the workshops are no longer held. The information may be a bit dated,
|>                    ^^^^^^^^^^^^^^
|>
|> No, they are still being held but the focus has changed. MICRO-26 was
|> held in Austin, TX in Dec. 93.

The annual microprogramming workshops are alive and well.  In response
to the original posters question, there are several surveys on
microprogramming languages.  Several references that might help are:

    author = "S. Dasgupta",
    title = "Some Aspects of High-Level Microprogramming",
    journal = "ACM Computing Surveys",
    month = "Sept.",
    year = 1980,
    pages = "295--323",
    note = "also in {\em Microprogramming and Firmware Engineering,}
            V. Milutinovic (ed.), 364--393, 1989"

Quote:
}


    author = "S. Dasgupta and B. D. Shriver",
    title = "Developments in Firmware Engineering",
    booktitle = "Advances in Computers",
    publisher = "Academic Press",
    address = "New York",
    year = "1985",
    pages = "101--176",
    volume = 24

Quote:
}


    editor = "S. Habib",
    title = "Microprogramming and Firmware Engineering Methods",
    publisher = "Van Nostrand Reinhold",
    address = "New York",
    year = 1988

Quote:
}

regards,
p. wilsey
--


Dept. of ECE, PO Box 210030                       Phone: (513) 556-4779
Cincinnati, OH  45221-0030                        FAX:   (513) 556-7326
--
--


Dept. of ECE, PO Box 210030                       Phone: (513) 556-4779


Tue, 14 Jan 1997 23:18:51 GMT  
 Language(s) for Microprograms ?

Quote:
>I am still looking for more responses, especially on how ROMS are modeled in
>Verilog and how these models are 'burnt' with data. Various ROMS models could
>be WRITE-ONCE, READONLY and EEPROMS atleast.
>I suppose they are handled using Arrays of Register variables, but how about
>the READ-ONLY properties ? How are they handled?

The following is a PROM and a RAM example I use in the Verilog training course I
publish.  They are simple examples to show the concepts, and do not represent any
real devices, but it should give you something to go by.

Stu Sutherland

/********************************************************************/
/* model of generic PROM with block read */

`timescale 1ns/1ns
module PROM (data, addr, read);
  parameter width = 8,
            words = 256;   /* default to 256x8 PROM */

  output [width-1:0] data;
  input  [width-1:0] addr;
  input              read;

  wire   [width-1:0] data, addr;
  wire               read;

  reg    [width-1:0] storage [0:words-1];

  assign #10 data = read? storage[addr]: 8'bz;

endmodule

/***********************************************************************/
/* A static 1024 X 8 RAM model. */
`timescale 1 ns / 1 ns
module sram (data, addr, wr_, oe_);
  inout [7:0] data;
  input [9:0] addr;
  input       wr_, oe_;

  wire  [7:0] data, temp;
  wire  [9:0] addr;
  wire        wr_, oe_, enable;

  reg [7:0] CORE [0:1023];


    CORE[addr] = data;

  assign temp = CORE[addr];               //read from RAM
  assign enable = !oe_? wr_: 1'b0;

  bufif1 (data[7], temp[7], enable);      //primitives are used on outputs
  bufif1 (data[6], temp[6], enable);      // to allow path delays
  bufif1 (data[5], temp[5], enable);
  bufif1 (data[4], temp[4], enable);
  bufif1 (data[3], temp[3], enable);
  bufif1 (data[2], temp[2], enable);
  bufif1 (data[1], temp[1], enable);
  bufif1 (data[0], temp[0], enable);

  specify
    (oe_ *> data) = 5;                    //enable/disable delay
    if (!oe_ ) (addr *> data) = 35;       //read access delay

    $setuphold(negedge wr_, addr, 5, 25); //setup/hold for address
    $width (negedge wr_, 10);             //write pulse width

    $width (posedge addr, 35);            //min address pulse width
    $width (negedge addr, 35);            //min address pulse width
  endspecify

endmodule

/********************************************************************/

module some_design;
  ...
  sram u1 (data, addr, wr_, oe_);
  PROM u2 (data, addr, read);
  defparam u2.width = 16;
  defparam u2.words = 1024;  //resize this PROM instance to 1024x16

  initial
    begin
      $readmemh("program.dat", u1.CORE);
      $readmemb("burnfile.dat", u2.storage);
  ...
endmodule

--
-- Stuart Sutherland                      Sutherland HDL Consulting  --

-- phone/fax: (303) 682-8864              Longmont, CO  80503        --
--                                                                   --
-- Publisher of Verilog HDL reference guides and training materials  --
-----------------------------------------------------------------------



Wed, 15 Jan 1997 19:43:06 GMT  
 Language(s) for Microprograms ?

Thanks to all the people who posted or sent me information by e-mail
regarding Languages for Microcodes, and the superminis of seventies that used to
load microcodes from disks.

I am still looking for more responses, especially on how ROMS are modeled in
Verilog and how these models are 'burnt' with data. Various ROMS models could
be WRITE-ONCE, READONLY and EEPROMS atleast.

I suppose they are handled using Arrays of Register variables, but how about
the READ-ONLY properties ? How are they handled?

Thanks
Sitaram



Wed, 15 Jan 1997 04:39:59 GMT  
 Language(s) for Microprograms ?
David A. Patterson (of Computer Architecture: A quantitative approach) wrote his
PhD thesis on Strum, a high level compiler for micro-code that included proof of
correctness functionality.  He presented some of this material at Micro10,
probably in the mid 70's.  I am sure some of it was published, as was his thesis.

(Although his current research interests are now quite different.)



Wed, 15 Jan 1997 09:30:38 GMT  
 Language(s) for Microprograms ?

   How do people write microprograms?

I can't speak for "people", but here's how I used to do it.  Back in
the very early 80's I worked for a small UK company making a
minicomputer of about the power of a VAX 11/750.  It was a fairly
traditional 32-bit mini; the only major difference being that it was
user-microprogrammable.  We supplied a two-stack machine as standard,
with the ucode written to support C efficiently, as well as a few
routines to help Unix (primarily virtual memory support).  The guts of
the machine were AMD 2901 4-bit ALU's and a 2910 12-bit sequencer.
This machine was the HLH Orion and it was very popular with people
researching machine architectures.  One weekend, I wrote a Lispkit
interpreter (then the fastest Lispkit in existence).  Just before I
left, I wrote a chunk of a graph-reduction combinator machine, and so
on.

Anyway, although I was the principal microprogrammer, another of our
chaps had written a very nice micro{assembler,linker,librarian}.
Writing this stuff was rather like writing a conventional assembly
language, except that each "instruction" had multiple fields, each of
which controlled a few bits in the instruction word and were all run
in parallel.  There were the normal constraints on timing, or use of
conflicting features and so on, but you get those on a conventional
assembly language but to a lesser extent.  The major hassle was that
the machine was pipelined, so I had to develop a one-move-lookbehind
style of programming.  It's been 10 years since I did this sort of
thing, but the code used to look something like:

------------

; Call one-line subroutine if both R0 and R1 are odd.

        CJS ODD sub     AB AND A=R0,B=R1

; Default condition code is TRUE.  Set up address to write result

        CRTN    ZA OR A=R3 ADDR

; Write result to memory,

        CONT    ZA A=R2 OR WRITE
...

sub:
; one-line subroutine.  Calculate data, and keep main memory bus locked

        CONT    AB NOTRS A=R0 B=R2 LOCK

------------

Note that, because of the pipeline, the return instruction is placed
immediately after the call!  The comment density looks about right as
well.  Because of the great ease with which errors could be made, we
commented the code rather heavily.

   Is there a language or a format that people especially in the industry,  use

   to describe microprograms along with the signals it works on/for ?

Undoubtedly.  There were several a decade ago.  We wrote our own
because none of them did what we wanted.

   Digression : Is it true that DEC system 10 used to keep its microprograms

   on the DISK rather than a ROM? Did any of the mainframes and super minis of the

   70s do this? Just curious.

I can't speak for DEC-10s.  The PDP 11/60 had a user writeable
controls store, as did the VAX 11/780 (I believe).  Their
microprograms were kept on disk and loaded at power-up.  Our machine
had *only* WCS (no ROM), so the boot processor (a Z80) would boot
itself from a CP/M diskette, and then load the main processor's
instruction set from that diskette.  Our machine had the very nice
feature that the instruction set could be modified on the fly, so
ucode could be loaded from within a running Unix program. Of course,
you had to be damned careful not to modify something important...  The
control store was just another couple of files in /dev

Paul
--

Oxford University Computing Services     |     the English way.
13 Banbury Road, Oxford, OX2 6NN, UK     | The time is gone, the song is over.
Tel: +44-865-273200  Fax: +44-865-273275 | Thought I'd something more to say.



Sat, 25 Jan 1997 17:18:47 GMT  
 Language(s) for Microprograms ?

Quote:
A. Wilsey) writes:

I would second Phil's references.  I studied under Prof. Milutinovic in
'88-'89 and
was able to do some neat projects using Verilog and microcode emulation
techniques.

I would like to add a reference: Hennessey and Patterson.

The Habib text is probably the best, but a little dry.  Another good one
is by an
author from U. Colorado (his names escapes me presently, but I will dig it
up when I get into work next week and get it to you).

D



Thu, 06 Feb 1997 07:35:09 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. Language(s) for Microprograms ?

2. Language(s) for Microprograms ?

3. 8051 microprogram..

4. FSM vs Microprogram

5. 8051 microprogram..

6. A Language Primer required for A Programming Language

7. multi-language vs mono-language, 1/2 (was: Me and FP &c)

8. multi-language vs mono-language, 2/2 (was: Me and FP &c)

9. Speed of FP languages, prospects (was Re: Benchmarking Lazy Functional Languages)

10. language advocacy and language comparison

11. Scripting Language Options List (how to build a language)

12. Use a new language: Structured Programming Language

 

 
Powered by phpBB® Forum Software