Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
饶先宏
hdl4se
提交
556b6811
H
hdl4se
项目概览
饶先宏
/
hdl4se
通知
12
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hdl4se
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
556b6811
编写于
9月 17, 2021
作者:
饶先宏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
202109172123
上级
0ae6b329
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
6 deletion
+16
-6
examples/hdl4se_riscv/de2/de2_riscv_axi.qws
examples/hdl4se_riscv/de2/de2_riscv_axi.qws
+0
-0
examples/hdl4se_riscv/de2/de2_riscv_axi.sof
examples/hdl4se_riscv/de2/de2_riscv_axi.sof
+0
-0
examples/hdl4se_riscv/verilog/led_key/led_key.v
examples/hdl4se_riscv/verilog/led_key/led_key.v
+8
-2
examples/hdl4se_riscv/verilog/riscv_axi/riscv_core_with_axi_master.v
...l4se_riscv/verilog/riscv_axi/riscv_core_with_axi_master.v
+2
-3
examples/hdl4se_riscv/verilog/uart/hdl4se_uart_ctrl_axi.v
examples/hdl4se_riscv/verilog/uart/hdl4se_uart_ctrl_axi.v
+6
-1
未找到文件。
examples/hdl4se_riscv/de2/de2_riscv_axi.qws
0 → 100644
浏览文件 @
556b6811
文件已添加
examples/hdl4se_riscv/de2/de2_riscv_axi.sof
浏览文件 @
556b6811
无法预览此类型文件
examples/hdl4se_riscv/verilog/led_key/led_key.v
浏览文件 @
556b6811
...
...
@@ -94,6 +94,8 @@
reg
[
1
:
0
]
axi_bresp
;
reg
axi_bvalid
;
reg
wen
;
assign
s00_axi_bresp
=
axi_bresp
;
assign
s00_axi_bvalid
=
axi_bvalid
;
...
...
@@ -114,7 +116,9 @@
begin
if
(
~
s00_axi_aresetn
)
begin
cpucount
<=
32'hffffffff
;
end
else
if
(
axi_awvalid
&&
axi_wvalid
)
begin
wen
<=
1
;
end
else
if
(
axi_awvalid
&&
axi_wvalid
&&
wen
)
begin
wen
<=
0
;
if
(
axi_awaddr
==
4
)
begin
cpucount
<=
{
axi_wstrb
[
3
]
?
axi_wdata
[
31
:
24
]
:
cpucount
[
31
:
24
],
axi_wstrb
[
2
]
?
axi_wdata
[
23
:
16
]
:
cpucount
[
23
:
16
],
...
...
@@ -122,7 +126,9 @@
axi_wstrb
[
0
]
?
axi_wdata
[
7
:
0
]
:
cpucount
[
7
:
0
]
}
;
end
end
end
else
begin
wen
<=
1
;
end
end
reg
axi_arready
;
...
...
examples/hdl4se_riscv/verilog/riscv_axi/riscv_core_with_axi_master.v
浏览文件 @
556b6811
...
...
@@ -89,7 +89,7 @@ module riscv_core_with_axi_master (
regfile
regs
(
regno
,
regena
,
m00_axi_aclk
,
regwrdata
,
regwren
,
regrddata
);
regfile
regs2
(
regno2
,
regena2
,
m00_axi_aclk
,
regwrdata2
,
regwren2
,
regrddata2
);
`define
ALTERA
_
`define
ALTERA
`ifdef
ALTERA
ram4kB
ram
(.
clock
(
m00_axi_aclk
),
.
address
(
ramaddr
),
.
byteena
(
~
bWriteMask
),
.
data
(
bWriteData
),
.
wren
(
isramwriteaddr
?
wWrite
:
1'b0
),
.
q
(
bReadDataRam
));
...
...
@@ -177,8 +177,7 @@ module riscv_core_with_axi_master (
writeready
<=
1'b0
;
else
if
(
~
writeready
)
writeready
<=
m00_axi_bvalid
||
write_local
||
isramwriteaddr
;
else
writeready
<=
0
;
always
@
(
wWrite
or
wvalid
or
bWriteData
or
wdata
or
bWriteMask
or
wstrb
)
begin
...
...
examples/hdl4se_riscv/verilog/uart/hdl4se_uart_ctrl_axi.v
浏览文件 @
556b6811
...
...
@@ -179,6 +179,8 @@ module hdl4se_uart_ctrl_axi
reg
[
1
:
0
]
axi_bresp
;
reg
axi_bvalid
;
reg
wen
;
assign
s00_axi_bresp
=
axi_bresp
;
assign
s00_axi_bvalid
=
axi_bvalid
;
...
...
@@ -200,8 +202,10 @@ module hdl4se_uart_ctrl_axi
if
(
~
s00_axi_aresetn
)
begin
divsor
<=
50000000
/
115200
;
send_buf_write
<=
0
;
end
else
if
(
axi_awvalid
&&
axi_wvalid
)
begin
wen
<=
1
;
end
else
if
(
axi_awvalid
&&
axi_wvalid
&&
wen
)
begin
send_buf_write
<=
0
;
wen
<=
0
;
if
((
axi_awaddr
&
4'hf
)
==
4'h4
)
begin
send_buf_data
<=
axi_wdata
[
7
:
0
];
send_buf_write
<=
~
recv_buf_full
;
...
...
@@ -210,6 +214,7 @@ module hdl4se_uart_ctrl_axi
end
end
else
begin
send_buf_write
<=
0
;
wen
<=
1
;
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录