我在做项目时,参照"https:/github.comeigenpiFace-Detection-on-FPGA。"的项目。我打算把OV7670摄像机换成Terasic-D5M摄像机,我试图把输入参数位从8位改为12位,但显示错误10344。我尝试将输入参数位从8位改为12位,但显示错误10344。我同时改变了顶层实体和连接功能输入的参数。我用Quartus RTL查看器检查了一下,它显示引脚名称被改变了,但参数保持了原来的值(8位).有谁知道问题出在哪里,或者有什么预设导致我无法改变参数? 谢谢。
错误10344是由于位范围不匹配,你已经出现了修复,你可以编译它并查看新的RTL。
然而,如果你不利用额外的4位,它们将在编译合成过程中被优化掉。
要把相机数据从8位改为12位,你需要改变以下信号的位数范围,并按照新相机的技术规格使用所有位数。
ov7670_data
d
latched_d
d_latch
dout
同时要注意的是 ov7670_pwdn
和 ov7670_reset
和其他摄像机控制信号,这些信号可能与新摄像机不同。
正如您所发现的,试图改变现有的摄像机控制器来控制新的摄像机是很困难的,甚至是不可能的。
因此,最好是将现有的控制器替换为新的摄像机控制器。D5M控制器,来自Terasic演示。.
第78行,第522行:
ov7670_data : in STD_LOGIC_VECTOR(7 downto 0);
522线
Inst_ov7670_capture: ov7670_capture PORT MAP(
pclk => ov7670_pclk,
capture => take_snapshot,
vsync => ov7670_vsync,
href => ov7670_href,
d => ov7670_data,
addr => image_wraddress_from_ov7670_capture,
dout => image_wrdata_from_ov7670_capture,
we => image_wren_from_ov7670_capture,
busy => ov7670_capture_busy
);
entity ov7670_capture is
Port ( pclk : in STD_LOGIC;
capture : in STD_LOGIC; -- recieves signal from a button to begin a single frame capture
vsync : in STD_LOGIC;
href : in STD_LOGIC;
d : in STD_LOGIC_VECTOR (7 downto 0);
addr : out STD_LOGIC_VECTOR (16 downto 0);
dout : out STD_LOGIC_VECTOR (11 downto 0);
we : out STD_LOGIC;
busy : out STD_LOGIC
);
end ov7670_capture;
第33行:
signal d_latch : std_logic_vector(15 downto 0) := (others => '0');
第41行:
signal latched_d : STD_LOGIC_VECTOR (7 downto 0) := (others => '0');
第48行:
dout <= d_latch(15 downto 12) & d_latch(10 downto 7) & d_latch(4 downto 1);
七十七线:
-- capturing the data from the camera, 12-bit RGB
if latched_href = '1' then
d_latch <= d_latch( 7 downto 0) & latched_d;
end if;
第110行
latched_d <= d;
Warning (13024): Output pins are stuck at VCC or GND
Warning (13410): Pin "vga_sync_N" is stuck at VCC
Warning (13410): Pin "ov7670_pwdn" is stuck at GND
Warning (13410): Pin "ov7670_reset" is stuck at VCC