永发信息网

懂ABLE语言和VHDL语言的进来!!

答案:2  悬赏:10  手机版
解决时间 2021-12-28 22:38
能帮我把这三个ABLE程序换成VHDL程序吗?
MODULE ct7
cin ,r pin ;
o0 ,o1 ,o2 ,o3 ,o4 ,o5 ,o6 ,o7 pin istype ’reg’;
count = [o7 ,o6 ,o5 ,o4 ,o3 ,o2 ,o1 ,o0 ] ;
equations
count . clk = cin ;
count . aclr = ! r ;
count = count + 1 ;
END

MODULE LJ
t0 , t1 , t2 , t3 , t4 , t5 , t6 , t7 pin ;
d0 , d1 , d2 , d3 , d4 , d5 , d6 , d7 pin ;
az ,af pin ;
cin ,fcin pin ;
n0 ,n1 ,n2 ,n3 ,n4 ,n5 ,n6 ,n7 ,out node ;
equations
n0 = t0 &d7 ;
n1 = t1 & ! t0 &d6 ;
n2 = t2 & ! t1 & ! t0 &d5 ;
n3 = t3 & ! t2 & ! t1 & ! t0 &d4 ;
n4 = t4 & ! t3 & ! t2 & ! t1 & ! t0 &d3 ;
n5 = t5 & ! t4 & ! t3 & ! t2 & ! t1 & ! t0 &d2 ;
n6 = t6 & ! t5 & ! t4 & ! t3 & ! t2 & ! t1 & !
t0 &d1 ;
n7 = t7 & ! t6 & ! t5 & ! t4 & ! t3 & ! t2 & !
t1 & ! t0 &d0 ;
out = n0 # n1 # n2 # n3 # n4 # n5 # n6 # n7 ;
az = ! cin &out ;
af = ! fcin &out ;
END

MODULE DS
clk ,fw ,r pin ;
cf pin ;
o0 ,o1 ,o2 ,o3 ,o4 node istype ’reg’;
count = [o4 ,o3 ,o2 ,o1 ,o0 ] ;
equations
count . clk = clk & ! (o4 &o3 &o2 &o1 &o0) ;
count . aclr = fw ;
cf = ! (o4 &o3 &o2 &o1 &o0) & ! fw &clk &r ;
count = count + 1 ;
END
最佳答案
第一个:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
ENTITY counter IS
PORT(clk: IN std_logic;
aclk:IN std_logic;
count:OUT std_logic_vector(7 downto 0));
END counter;
ARCHITECTURE ct7 OF counter IS
SIGNAL n:std_logic_vector(7 downto 0);
BEGIN
PROCESS
BEGIN
WAIT UNTIL (clk'event and clk='1');
IF aclk='0' THEN
n<= (OTHERS =>'0');
ELSE
n<= n+1;
END IF;
END PROCESS;
count<=n;
END ct7

第二个:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
ENTITY LJ IS
P ORT(
t0,t1,t2,t3,t4,t5,t6,t7 in std_logic;
d0,d1,d2,d3,d4,d5,d6,d7 in std_logic;
az,af out std_logic;
cin,fcin in std_logic;
)
END LJ
ARCHITECTURE eval OF LJ IS
SIGNAL n0,n1,n2,n3,n4,n5,n6,n7 :std_logic;
BEGIN
n0 <= t0 AND d7;
n1 <= t1 AND NOT t0 AND d6;
n2 <= t2 AND NOT t1 AND NOT t0 AND d5 ;
n3 <= t3 AND NOT t2 AND NOT t1 AND NOT t0 AND d4 ;
n4 <= t4 AND NOT t3 AND NOT t2 AND NOT t1 AND NOT t0 AND d3 ;
n5 <= t5 AND NOT t4 AND NOT t3 AND NOT t2 AND NOT t1 AND NOT t0 AND d2;
n6 <= t6 AND NOT t5 AND NOT t4 AND NOT t3 AND NOT t2 AND NOT t1 AND NOT t0 AND d1 ;
n7 <= t7 AND NOT t6 AND NOT t5 AND NOT t4 AND NOT t3 AND NOT t2 AND NOT t1 AND NOT t0 AND d0 ;
out <= n0 OR n1 OR n2 OR n3 OR n4 OR n5 OR n6 OR n7;
az <= NOT cin AND out ;
af <= NOT fcin AND out ;
END eval;

第三个:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
ENTITY counter IS
PORT(clk,fw,r,pin: IN std_logic;
cf: OUT std_logic
count:OUT std_logic_vector(4 downto 0));
END counter;
ARCHITECTURE ds OF counter IS
SIGNAL n:std_logic_vector(4 downto 0);
BEGIN
PROCESS
BEGIN
WAIT UNTIL (clk'event and clk='1');
IF fw='0' THEN
n<= (OTHERS =>'0');
ELSE
n<= n+1;
END IF;
END PROCESS;
cf<=NOT (n(4) AND n(3) AND n(2) AND n(1) AND m(0)) AND NOT fw AND clk NOT r ;
count<=n;
END ds

看在这么多代码,回答的人又少,能不能多给点分啊?
全部回答
任务占坑
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
母亲节这天,小华为妈妈准备了一顿丰盛的晚餐
一般自行车的时速是多少公里??
单选题可称为天体的是A.天上彩虹B.北极星和牛
请问,内存升级?好心人帮帮忙?,我的机子安装的
绝命海拔中英字幕高清
EPSONLQ-1600打印机出现入纸抖动后退纸、无法
单选题同学们要栽30棵树,已栽完7棵,还剩多
鼠标如何判断滚轮是前滚还是后滚?
现在办一张建设银行卡要钱吗?
单选题集贸市场上的商品销售,讨价还价是普遍
would like you to love me the same love yo
单选题改革收入分配制度,必须适当提高企业离
大家帮忙看一下,我这个是不是柯基的串串,如
英语教师的理想与情怀:你为什么而教
现在火箭的主场有几个中国的企业广告?
推荐资讯
请给我〖陈晓 赵丽颖〗一起上过的综艺节目,
电磁炉烧饭时会发出吱吱的声音是怎么回事?
莲花照像地址有知道的么?有点事想过去!
请问电视、功放机、蓝光DVD怎么连接
比较大小:|-3|________π,0.32________0.33
长长的螺叫什么名字
炫舞怎么全屏
有人在储存白菜的地窖中丧生,你知道“杀手”
景县人民检察院举报中心办公位置在哪啊?好找
人马的四字成语
临沂市公安局交警支队直属三大队地址有知道的
单词拼写:根据首字母填入恰当的单词使句子完
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?