赞
踩
FPGA工程师面试——FPGA基础知识24题 编程
在面试FPGA工程师岗位时,经常会遇到与FPGA基础知识相关的编程问题。本文将为您介绍24个常见的FPGA基础知识编程问题,并提供相应的源代码示例。以下是这些问题的回答:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity binary_adder is
port(A, B : in std_logic_vector(3 downto 0);
sum : out std_logic_vector(3 downto 0);
carry_out : out std_logic);
end binary_adder;
architecture Behavioral of binary_adder is
begin
sum <= A + B;
carry_out <= '1' when ((A+1) > 15) else '0';
end Behavioral;
module signed_adder(input [7:0] A, B, output [7:0] sum);
assign sum = A + B;
endmodule
library IEEE;
use I
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。