LoginSignup
0
0

More than 3 years have passed since last update.

vistaでquartus その8

Last updated at Posted at 2020-06-21

概要

vistaでquartusやってみた。
俺cpuやってみた。
0から9まで、数えて見た。

環境

windows vista 32bit
quartus ii v13.0
ep2c5t144ボード

アセンブラで書く。

  push  0
  set  i
loop:
  get  i
  push  10
  <
  if  pass 
  get  i
  push  48
  +
  out
  get  i
  push  1
  +
  set  i
  jp loop

ハンドアセンブル

        mem[0] =  16'h1000;//push 0
        mem[1] =  16'h300f;//set 15
        mem[2] =  16'h200f;//get 15
        mem[3] =  16'h100a;//push 10
        mem[4] =  16'hf00f;//<
        mem[5] =  16'h5005;//if 5 
        mem[6] =  16'h200f;//get 15
        mem[7] =  16'h1030;//push 48
        mem[8] =  16'hf000;//+
        mem[9] =  16'he000;//out
        mem[10] =  16'h200f;//get 15
        mem[11] =  16'h1001;//push 1
        mem[12] =  16'hf000;//+
        mem[13] =  16'h300f;//set 15
        mem[14] =  16'h4002;//jp  2
        mem[15] =  16'h0000;//i

iverilog実行結果

0
1
2
3
4
5
6
7
8
9

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0