0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

windowsでiverilog その164

Last updated at Posted at 2024-12-17

概要 

windowsでiverilogやってみた。
自作cpu、見つけたので、調査してみた。
アセンブラやってみた。

参考にしたページ

手順

$ cd rust
$ ls
asm0     asm1     asm2     dentaku  hello.rs  mandel    qiita  server0  wget    zundoko
asm0.rs  asm1.rs  asm2.rs  hello    hello0    openmind  scrap  server1  zipapi

$ cargo install --git https://github.com/kkinos/zktc-asm.git
    Updating git repository `https://github.com/kkinos/zktc-asm.git`
  Installing zktc-asm v0.1.0 (https://github.com/kkinos/zktc-asm.git#f59c77e6)
    Updating crates.io index
  Downloaded anstyle-parse v0.2.6
  Downloaded clap_lex v0.7.4
  Downloaded anstream v0.6.18
  Downloaded clap-num v1.1.1
  Downloaded strsim v0.11.1
  Downloaded heck v0.5.0
  Downloaded colorchoice v1.0.3
  Downloaded anstyle-query v1.1.2
  Downloaded is_terminal_polyfill v1.70.1
  Downloaded anstyle v1.0.10
  Downloaded clap_derive v4.5.18
  Downloaded unicode-ident v1.0.14
  Downloaded anyhow v1.0.94
  Downloaded proc-macro2 v1.0.92
  Downloaded clap v4.5.23
  Downloaded clap_builder v4.5.23
  Downloaded syn v2.0.90
  Downloaded 17 crates (834.6 KB) in 0.87s
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling utf8parse v0.2.2
   Compiling autocfg v1.4.0
   Compiling anstyle-parse v0.2.6
   Compiling anstyle-query v1.1.2
   Compiling anstyle v1.0.10
   Compiling colorchoice v1.0.3
   Compiling is_terminal_polyfill v1.70.1
   Compiling anstream v0.6.18
   Compiling strsim v0.11.1
   Compiling num-traits v0.2.19
   Compiling heck v0.5.0
   Compiling clap_lex v0.7.4
   Compiling anyhow v1.0.94
   Compiling clap_builder v4.5.23
   Compiling memchr v2.7.4
   Compiling quote v1.0.37
   Compiling syn v2.0.90
   Compiling minimal-lexical v0.2.1
   Compiling nom v7.1.3
   Compiling clap-num v1.1.1
   Compiling clap_derive v4.5.18
   Compiling clap v4.5.23
   Compiling zktc-asm v0.1.0 (/home/ore/.cargo/git/checkouts/zktc-asm-86776037d8a0ab1f/f59c77e)
    Finished release [optimized] target(s) in 1m 28s
  Installing /home/ore/.cargo/bin/zktc-asm
   Installed package `zktc-asm v0.1.0 (https://github.com/kkinos/zktc-asm.git#f59c77e6)` (executable `zktc-asm`)
warning: be sure to add `/home/ore/.cargo/bin` to your PATH to be able to run the installed binaries

$ explorer.exe .

$ zktc-asm sample.asm -o sample.mem
zktc-asm: command not found

$ /home/ore/.cargo/bin/zktc-asm sample.asm -o sample.mem

$ ls
asm0     asm1     asm2     dentaku  hello.rs  mandel    qiita       sample.mem  server0  wget    zundoko
asm0.rs  asm1.rs  asm2.rs  hello    hello0    openmind  sample.asm  scrap       server1  zipapi

$ cat sample.mem
31
0a
52
00
20
2a
4c
01
6c
11
6c
6c
48
65

投入したソース

start:
	lil x1, msg@l
	lih x2, msg@h
	or x1, x2
	lw x2, x1, 0
	lw x3, x1, 2
msg:
	.word 0x6c6c
	.word 0x6548

実行結果

31
0a
52
00
20
2a
4c
01
6c
11
6c
6c
48
65

以上。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?