- 博客(2)
- 收藏
- 关注
原创 c++ 写文件
0a变成0d0a#include using namespace std;int _tmain(int argc, _TCHAR* argv[]){ ofstream fout; fout.open("d:\\test.dat"); int a = 0x7788; fout.write((char*) &a, sizeof(int));}打
2017-05-12 20:14:53 283
原创 inout端口的使用
在vhdl中,有时需要用inout端口,例如对sram的读写。sram的输入和输出数据共用数据总线。在对将inout端口作为输出使用之后,如果要从inout端口读取输入应先将其置高阻态。因为inout端口是用三态门实现的,可以理解为高阻态能实现从输出到输入的转换。例如下面的代码段所做,下面的进程实现了对内存内容加1 的功能rw:process(iclk)beginif
2017-03-29 15:24:37 1309
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人