[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 1001- 2ch.scのread.cgiへ]
Update time : 06/23 14:48 / Filesize : 276 KB / Number-of Response : 1048
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

【Verilog】 記述言語で論理設計Project14 【VHDL】



695 名前:774ワット発電中さん [2017/03/13(月) 09:50:35.51 ID:TcShF5sa.net]
コード比較
-----verilog-----
module mod_a (
input clk,
input rst_x,
input [7:0] i_in,
output reg [7:0] o_out
);
always @(posedge clk or negedge rst_x) begin
if (~rst_x) o_out <= 8'h0;
else o_out <= i_in;
end
endmodule

----- 糞VHDL -----
library IEEE;
use IEEE.std_logic_1164.all;

entity mod_a is
port (
clk : in std_logic;
rst_x: in std_logic;
i_in : in std_logic_vector(7 downto 0);
o_out : out std_logic_vector(7 downto 0)
);
end mod_a;

architecture rtl of mod_a is
signal r_out : std_logic_vector(7 downto 0);
begin
process (clk, rst_x) begin
if (rst_x = '0') then
r_out <= (others => '0');
elsif (clk'event and clk = '1') then
r_out <= i_in;
end if;
end process;
o_out <= r_out;
end rtl;






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<276KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef