cpp1.cpp
来自「在quartus软件下用VHDL语言实现DDS」· C++ 代码 · 共 28 行
CPP
28 行
#include<iostream.h>
#include<fstream.h>
#include<math.h>
void main()
{
ofstream outfile;
outfile.open("juxing.mif");
outfile<<"--juxing.mif--"<<endl;
outfile<<"depth=4096;"<<endl;
outfile<<"width=10;"<<endl;
outfile<<"address_radix=dec;"<<endl;
outfile<<"data_radix=hex;"<<endl;
outfile<<"content begin"<<endl;
for(int i=0;i<2048;i++)
{outfile<<dec<<i<<" : "<<hex<<1024<<";"<<endl;
}
for(int j=2048;j<4096;j++)
{outfile<<dec<<j<<" : "<<hex<<0<<";"<<endl;
}
outfile<<"end;";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?