资源简介
使用BCB做的一个小的程序,
专门用于生成ROM表的mif文件。

代码片段和文件信息
//---------------------------------------------------------------------------
#include
#include
#include
#include
#pragma hdrstop
#include “sin.h“
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource “*.dfm“
TForm1 *Form1;
char key=0;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
Cbb->Items->Add(“正弦波“);
Cbb->Items->Add(“三角波“);
Cbb->Items->Add(“锯齿波“);
Cbb->Items->Add(“方波“);
Lbf->Visible=false;
Edtf->Visible=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BtnOKClick(Tobject *Sender)
{
using namespace std;
double s;
unsigned int t;
int m;
fstream file;
file.open(“sinzhu.mif“ios::out);
file<<“--zhu shi qiang : 2012-4-26\n\n“;
file<<“-- Copyright (C) 1991-2006 Altera Corporation \n“
<<“-- Your use of Altera Corporation‘s design tools logic functions\n“
<<“-- and other software and tools and its AMPP partner logic\n“
<<“-- functions and any output files any of the foregoing \n“
<<“-- (including device programming or simulation files) and any \n“
<<“-- associated documentation or information are expressly subject \n“
<<“-- to the terms and conditions of the Altera Program License \n“
<<“-- Subscription Agreement Altera MegaCore Function License \n“
<<“-- Agreement or other applicable license agreement including \n“
<<“-- without limitation that your use is for the sole purpose of \n“
<<“-- programming logic devices manufactured by Altera and sold by \n“
<<“-- Altera or its authorized distributors. Please refer to the \n“
<<“-- applicable agreement for further details. \n“
<<“-- Quartus II generated Memory Initialization File (.mif) \n\n“;
file<<“WIDTH=“<Text);
file<<“;\n“;
file<<“DEPTH=“<Text);
file<<“;\n\n“;
file<<“ADDRESS_RADIX=UNS;\nDATA_RADIX=UNS;\n\n“;
file<<“CONTENT BEGIN\n“;
switch(key)
{
case 1:
for(int i=0;iText);i++)
{
s=sin(((8*atan(1.0)*i)/(StrToInt(EdtCount->Text)-1))+
StrToInt(EdtPhase->Text)/360.0*8*atan(1.0));
t=(unsigned int)((s+1)*(256-1)/2);
file<<“ “< file<<“ “;
file< file<<“;“< };break;
case 2:
m=StrToInt(EdtPhase->Text)/360.0*StrToInt(EdtCount->Text);
if(mText)/2)
{
for(int i=m;iText)/2;i++)
{
t=255*i/(StrToInt(EdtCount->Text)/2-1);
file<<“ “<
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 100061 2011-01-06 17:17 sinmif\ico.ico
文件 7909 2012-06-03 13:43 sinmif\sin.cpp
文件 51 2012-06-03 13:43 sinmif\sin.ddp
文件 36351 2012-06-03 00:25 sinmif\sin.dfm
文件 1297 2012-06-01 00:02 sinmif\sin.h
文件 68227 2012-06-03 13:45 sinmif\sin.obj
文件 7517 2012-06-03 13:38 sinmif\sin.~cpp
文件 51 2012-06-03 13:38 sinmif\sin.~ddp
文件 36351 2012-06-03 00:25 sinmif\sin.~dfm
文件 1297 2012-06-01 00:02 sinmif\sin.~h
文件 3576 2012-06-03 13:45 sinmif\sin1.bpr
文件 1123 2012-05-16 00:32 sinmif\sin1.cpp
文件 774656 2012-06-03 13:45 sinmif\sin1.exe
文件 9922 2012-06-03 13:45 sinmif\sin1.obj
文件 15256 2012-06-03 13:44 sinmif\sin1.res
文件 983040 2012-06-03 13:45 sinmif\sin1.tds
文件 3576 2012-06-03 01:32 sinmif\sin1.~bpr
文件 3381 2012-06-03 13:47 sinmif\sinzhu.mif
文件 15086 2011-04-22 14:21 sinmif\thunder.ico
目录 0 2012-06-03 13:45 sinmif
----------- --------- ---------- ----- ----
2068728 20
- 上一篇:计算机专业车牌识别外文翻译
- 下一篇:IE修复到默认状态的批处理
相关资源
- Xpath生成器,自动生成可用的Xpath。
- 德卡D8读写器关于读写感应卡的一些代
- 鼎博、立林、康拓、大华一卡一密生
- 制作迅雷 链接生成器
- regexBuilder 正则表达式自动生成器
- M1卡破解程序 Mifare 1k
- mac数据生成器
- Linux点阵字库和字库生成器.rar
- 基于Freemarker模板的代码生成器后台代
- 易语言QQ名片生成器源码
- HP笔记本BISO DMI
- 伪造专家造假盒子(装B转账记录生成
- V5快递单号生成器 v9.5.zip
- 无极原创文章生成器 v1.5.zip
- 3389批量生成器 用于批量生成远程桌面
- 锁机软件生成器
- Mifare卡LockSDK V3.3酒管软件接口_160301
- 动软代码生成器
- 正则表达式自动生成器 V2.0.0.1 官方多
- Superdic超级字典生成器完美破解版
- IP配置器Collocate加网狐数据生成器.z
- C51代码生成器(代码快速生成工具)
- GPX坐标生成器
- EDID 生成器
- 词法分析器自动生成器 FLEX
- 点阵字体生成器TS4已注册100%无功能限
- 淘宝快递订单生成器
- 流程图生成器
- imei生成器249327
- 古诗生成器
评论
共有 条评论