Altera QuartusII 12.1 から Qsys で AXI4 がサポートされました。 そこで、かんたんなサンプル(テンプレート)を作ってみました。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uenvcmd=fatload mmc 0 0x03000000 uImage && fatload mmc 0 0x02A00000 devicetree.dtb && bootm 0x03000000 - 0x02A00000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; ロードパスを追加 | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(setq load-path (cons "~/.xemacs" load-path)) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; キーアサイン | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(progn | |
(global-set-key "\C-a" 'backward-word) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
module sll64_byte (indata,val_nnnnxxx,outdata); | |
input [63:0] indata; | |
input [3:0] val_nnnnxxx; // shift | |
output [63:0] outdata; | |
wire [6:0] shift_v; | |
assign shift_v={val_nnnnxxx,3'b000}; | |
assign outdata=indata<<shift_v; | |
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BARREL_SHIFTER(indata, val, outdata); | |
parameter integer data_bits = 64; | |
parameter integer val_bits = 32; | |
input [data_bits-1:0] indata; | |
input [ val_bits-1:0] val; | |
output [data_bits-1:0] outdata; | |
function integer calc_max(input integer bits); | |
for (calc_max = 1; (2**calc_max) <= bits; calc_max = calc_max + 1) begin end | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module gen_table_top ( | |
input wire clk, | |
input wire [8:0] neigbors, | |
output reg result | |
); | |
reg [511:0] is_live_table; | |
reg [8:0] neigbors_r; | |
wire wdata; | |
function is_live; |
先日知り合いから「MT19937AR パッケージと TINYMT32 パッケージで、同じタイプ名を使ってるので 混在できないんじゃない?」というツッコミがあって、「ぬ?こうすりゃ出来るよ」と言う話になって、 その例を書いてみた。
- mt19937ar.vhd (from https://gist.github.com/2056693)
- tinymt32.vhd (from https://gist.github.com/2176977)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GHDL=ghdl | |
GHDLFLAGS=--mb-comments | |
WORK=work | |
TEST_BENCH = test_bench_dwc_w08_i1_o1_q0_j0 \ | |
test_bench_dwc_w08_i1_o2_q0_j0 \ | |
test_bench_dwc_w08_i1_o3_q0_j0 \ | |
test_bench_dwc_w08_i1_o4_q0_j0 \ | |
test_bench_dwc_w08_i2_o1_q0_j0 \ | |
test_bench_dwc_w08_i2_o2_q0_j0 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GHDL=ghdl | |
GHDLFLAGS=--mb-comments | |
GHDLRUNFLAGS=$(GHDLFLAGS) | |
WORK=work | |
TEST_BENCH = test_bench_one_hot_arch \ | |
test_bench_integer_arch \ | |
$(END_LIST) | |
all: $(TEST_BENCH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GHDL=ghdl | |
GHDLFLAGS =--ieee=synopsys -fexplicit --mb-comments | |
GHDLRUNFLAGS=--ieee=synopsys -fexplicit --mb-comments | |
WORK=work | |
TEST_BENCH = test_bench \ | |
$(END_LIST) | |
all: $(TEST_BENCH) |