X_HDL3 VERILOG to VHDL
今天得到软件x-hdl,整个软件不大,好象是2.7M,有兴趣的可以来这里下载:
ftp://218.64.19.133
文件1(intall):xhdl3.1.42.exe
文件2(crack) :X-HDL.v3.1.30.zip(我现在只有X-HDL.v3.1.30的,没法,先用它吧)。
据介绍,用它可以把你的VHDL设计文件转换为
VERILOG,也可以把VERILOG===》VHDL。我安装后马上试了一下,
以下是我第一次试用的VERILOG,一个十进制计数器:
module count10(out,clk);
output out;
input clk;
reg out;
reg [2:0] count;
always @(posedge clk )
begin
count = count + 1;
if( count == 5 )
begin
count = 0;
out =!out;
end
end
endmodule
下面是用它转换VHDL的结果:---------------------------------------------------------------------------------------------
--
-- VHDL file generated by X-HDL - Revision 3.1.42
-- Wed Oct 31 15:00:13 2001
--
-- Input file : c:/My Documents/XXXXXX/count5.v
-- Design name : count5
-- Author : 112
-- Company : 112
--
-- Description :
--
--
----------------------------------------------------------------------------------------------
--
ENTITY count5 IS
PORT (
out_xhdl1 : OUT std_logic;
clk : IN std_logic);
END count5;
ARCHITECTURE translated OF count5 IS
SIGNAL count : std_logic_vector(2 DOWNTO 0);
SIGNAL out_xhdl1_xhdl2 : std_logic;
BEGIN
out_xhdl1 <= out_xhdl1_xhdl2;
PROCESS
BEGIN
WAIT UNTIL (clk'EVENT AND clk = '1');
count <= count + "001";
IF (count = "101") THEN
count <= "000";
out_xhdl1_xhdl2 <= NOT out_xhdl1_xhdl2;
END IF;
END PROCESS;
END translated;
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。