Ever  wanted to make your own micro ?
Ever needed that "special instruction" that wasn't included in the asm. ?
Ever wanted to play with the guts of a processor ?

Well now you can .....

Introducing the
6805 core
Ralph Nevins March 8 2000
a simple processor with
ONE accumulator ,
ONE index register ,
SEVEN addressing modes,
FIVE bit stack (32 address)
ONE HUNDRED AND TWENTY EIGHT bytes of RAM
ONE HUNDRED AND TWENTY EIGHT bytes of  I/O space
ONE THOUSAND AND TWENTY FOUR bytes of ROM
FOUR types of interrupts

and  the completeset of instructions for the 6805 family are  implemented  (almost)
-most at this time  untested-

The design  of the cpu core, and the I/O structure  were adapted from  ROTH,C. , Digital System Design using VHDL, 1997  .    The  code in Roth's book is not synthesizable using  Altera software, therefore significant structure modifications were made. The text is usefull to understand the functions of the processes within the cpu core.   Modifications to the shell (m68hc05) around the core were,  (1) to add  1k of ROM (adjustable) , (2) 128 bytes of RAM (adjustable) , and  (3) in this incarnation a third i/o port.   I/O port functionality was modified to remove the data direction register.   Thid design was tested & proved functional at 25.175/6 MHz, additional I/O or other modification may change the upper operating frequency. Commented code left in the vhdl files are part of testing or demonstrating previous (nonfunctional) code.

This vhdl code can ONLY be synthesized on the Lab workstations  - it  dies with an "unkown error" on the 9.23 student versions.

The assembler (PseudoSam 685 aka: 6805.zip ) used was pulled from the net  and is a "free to use for educational purposes" DOS based command line assembler.

Notes:

  1. to simulate - modify the code segment  in m68hc05.vhd that controls the cpu clock to be  1 to 1, (extreemly useful for debugging instruction problems)
    1. --     process (clock)
      --      VARIABLE cnt    : INTEGER RANGE 0 TO 5;
      --     BEGIN
      --      IF (clock'EVENT AND clock = '1') THEN
      --          cnt := cnt + 1;
      --      end if;
      --      if (cnt > 2)  then
      --          clk <= '1' ;
      --      else
      --          clk <= '0' ;
      --      end if;
      --     end process;

       clk <= clock;
       

  2. to synthesize- modify the code segment    in m68hc05.vhd that controls the cpu clock to be  6 to 3 ,
    1.      process (clock)
            VARIABLE cnt    : INTEGER RANGE 0 TO 5;
           BEGIN
            IF (clock'EVENT AND clock = '1') THEN
                cnt := cnt + 1;
            end if;
            if (cnt > 2)  then
                clk <= '1' ;
            else
                clk <= '0' ;
            end if;
           end process;

      -- clk <= clock;
       

  3. to create your mif file ,
  4. changing  the ram and rom sizes  in m68hc05
  5. adding i/o in m68hc05
The FILES

vhdl
- cpu6805.vhd - - m68hc05.vhd - - port_a.vhd -

  sample asm and the resulting mif
- flex.asm - - 6805_test.mif -

the assembler
- 6805.zip -

e-mail Ralph