OpenCores
URL https://opencores.org/ocsvn/mlite/mlite/trunk

Subversion Repositories mlite

[/] [mlite/] [trunk/] [vhdl/] [control.vhd] - Diff between revs 84 and 113

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 84 Rev 113
Line 270... Line 270...
      alu_function := alu_add;
      alu_function := alu_add;
   when "001010" =>   --SLTI   r[rt]=r[rs]<(short)imm;
   when "001010" =>   --SLTI   r[rt]=r[rs]<(short)imm;
      b_source := b_from_signed_imm;
      b_source := b_from_signed_imm;
      c_source := c_from_alu;
      c_source := c_from_alu;
      rd := rt;
      rd := rt;
      alu_function := alu_less_than;
      alu_function := alu_less_than_signed;
   when "001011" =>   --SLTIU  u[rt]=u[rs]<(unsigned long)(short)imm;
   when "001011" =>   --SLTIU  u[rt]=u[rs]<(unsigned long)(short)imm;
      b_source := b_from_imm;
      b_source := b_from_imm;
      c_source := c_from_alu;
      c_source := c_from_alu;
      rd := rt;
      rd := rt;
      alu_function := alu_less_than;
      alu_function := alu_less_than;
Line 334... Line 334...
      alu_function := alu_add;
      alu_function := alu_add;
      pc_source := from_lbranch;
      pc_source := from_lbranch;
      branch_function := branch_gtz;
      branch_function := branch_gtz;
   when "100000" =>   --LB     r[rt]=*(signed char*)ptr;
   when "100000" =>   --LB     r[rt]=*(signed char*)ptr;
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      rd := rt;
      rd := rt;
      c_source := c_from_memory;
      c_source := c_from_memory;
      mem_source := mem_read8s;    --address=(short)imm+r[rs];
      mem_source := mem_read8s;    --address=(short)imm+r[rs];
   when "100001" =>   --LH     r[rt]=*(signed short*)ptr;
   when "100001" =>   --LH     r[rt]=*(signed short*)ptr;
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      rd := rt;
      rd := rt;
      c_source := c_from_memory;
      c_source := c_from_memory;
      mem_source := mem_read16s;   --address=(short)imm+r[rs];
      mem_source := mem_read16s;   --address=(short)imm+r[rs];
   when "100010" =>   --LWL    //Not Implemented
   when "100010" =>   --LWL    //Not Implemented
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      rd := rt;
      rd := rt;
      c_source := c_from_memory;
      c_source := c_from_memory;
      mem_source := mem_read32;
      mem_source := mem_read32;
   when "100011" =>   --LW     r[rt]=*(long*)ptr;
   when "100011" =>   --LW     r[rt]=*(long*)ptr;
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      rd := rt;
      rd := rt;
      c_source := c_from_memory;
      c_source := c_from_memory;
      mem_source := mem_read32;
      mem_source := mem_read32;
   when "100100" =>   --LBU    r[rt]=*(unsigned char*)ptr;
   when "100100" =>   --LBU    r[rt]=*(unsigned char*)ptr;
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      rd := rt;
      rd := rt;
      c_source := c_from_memory;
      c_source := c_from_memory;
      mem_source := mem_read8;    --address=(short)imm+r[rs];
      mem_source := mem_read8;    --address=(short)imm+r[rs];
   when "100101" =>   --LHU    r[rt]=*(unsigned short*)ptr;
   when "100101" =>   --LHU    r[rt]=*(unsigned short*)ptr;
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      rd := rt;
      rd := rt;
      c_source := c_from_memory;
      c_source := c_from_memory;
      mem_source := mem_read16;    --address=(short)imm+r[rs];
      mem_source := mem_read16;    --address=(short)imm+r[rs];
   when "100110" =>   --LWR    //Not Implemented
   when "100110" =>   --LWR    //Not Implemented
   when "101000" =>   --SB     *(char*)ptr=(char)r[rt];
   when "101000" =>   --SB     *(char*)ptr=(char)r[rt];
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      mem_source := mem_write8;   --address=(short)imm+r[rs];
      mem_source := mem_write8;   --address=(short)imm+r[rs];
   when "101001" =>   --SH     *(short*)ptr=(short)r[rt];
   when "101001" =>   --SH     *(short*)ptr=(short)r[rt];
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      mem_source := mem_write16;
      mem_source := mem_write16;
   when "101010" =>   --SWL    //Not Implemented
   when "101010" =>   --SWL    //Not Implemented
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      mem_source := mem_write32;  --address=(short)imm+r[rs];
      mem_source := mem_write32;  --address=(short)imm+r[rs];
   when "101011" =>   --SW     *(long*)ptr=r[rt];
   when "101011" =>   --SW     *(long*)ptr=r[rt];
      a_source := a_from_reg_source;
      a_source := a_from_reg_source;
      b_source := b_from_imm;
      b_source := b_from_signed_imm;
      alu_function := alu_add;
      alu_function := alu_add;
      mem_source := mem_write32;  --address=(short)imm+r[rs];
      mem_source := mem_write32;  --address=(short)imm+r[rs];
   when "101110" =>   --SWR    //Not Implemented
   when "101110" =>   --SWR    //Not Implemented
   when "101111" =>   --CACHE
   when "101111" =>   --CACHE
   when "110000" =>   --LL     r[rt]=*(long*)ptr;
   when "110000" =>   --LL     r[rt]=*(long*)ptr;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.