»ù±¾ÔËËãµ¥ÔªµÄ¸ß²ã´Î×ۺϣºC/C++ to RTL
±¾ÎÄÒÔ¼Ó·¨ÎªÀý£º[code]
//----------------------------------------------------
//adder.c
//---------------------------------------------------
void adder(int a, int b, int *sum)
{
*sum = a + b;
}
[/code][size=3]
[/size]
HLS¹¤¾ß£¨AutoPilot£©×ÛºÏÖ®ºóµÄ½á¹û£º[code]
//---------------------------------------------------
//adder.v
//--------------------------------------------------
`timescale 1 ns / 1 ps
module adder (
a,
b,
sum
);
input [31:0] a;
input [31:0] b;
output [31:0] sum;
assign sum = (b + a);
endmodule //adder
[/code][size=3]
[/size][code]
//---------------------------------------------------
//adder.vhd
//---------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
library work;
use work.AESL_components.all;
entity adder is
port (
a : IN STD_LOGIC_VECTOR (31 downto 0);
b : IN STD_LOGIC_VECTOR (31 downto 0);
sum : OUT STD_LOGIC_VECTOR (31 downto 0) );
end;
architecture behav of adder is
begin
sum <= esl_add(b, a);
end behav;
[/code][size=3]
[/size]
±¸×¢£º¼Ó¼õ³Ë³ý¡¢Î»ÔËËã¡¢Âß¼ÔËËãµÈµÈ»ù±¾µÄC/C++ÔËË㶼¿ÉÒԺܷ½±ãµÄÓÃAutoPilot×ۺϳɶÔÓ¦µÄRTL´úÂ루verilog/vhdl)[/size]
Ïà¹ØÎĵµ£º
ѧÉúʱ´úרҵÊÇ»úе£¬µ«ÊDzμӹ¤×÷ºó£¬»úÔµÇɺϴÓÊÂÁËÓëÈí¼þÏà¹ØµÄ¹¤×÷£¬¾ÍÊǶԴóÐ͹¤³ÌÈí¼þÈí¼þ×öһЩ¶þ´Î¿ª·¢£¬ÊÕ»ñ¹ý¿ìÀÖ£¬ÊÕ»ñ¹ýÐÁËᣬÔÚÒ»´ÎÓÖÒ»´ÎµÄµÃÓëʧÖУ¬ÏëÕÒÒ»¸öµØ·½£¬ÕÒһЩÈË¿ÉÒÔÂýÂýÓëÖ®·ÖÏí£¬ÓëÖ®½»Á÷£¬²¢Æڵõ½°ïÖú»òÌṩ°ïÖú£¡Ò²ÐíÄãÊÇÎÞÒâ¼û·¹ý£¬Éõ»òƯ¹ý£¬µ«ÄãµÄעĿÊÇÎÒÇ°½øµÄ¶¯Á¦£¬ÓÐÐÒפ×ãÒ²»áÈÃÎÒ ......
·ÇʱÉСñ2010ÐÂ¿î ¹¬Í¢¸´¹ÅÂÞÂíЬÕæƤÁ¹Ð¬ÊæÊÊƽµ×ЬŮЬ
189.0Ôª
Ò»¸öÓÉC/C++±àÒëµÄ³ÌÐòÕ¼ÓõÄÄÚ´æ·ÖΪÒÔϼ¸¸ö²¿·Ö
1¡¢Õ»Çø£¨stack£©— ³ÌÐòÔËÐÐʱÓɱàÒëÆ÷×Ô¶¯·ÖÅ䣬´æ·Åº¯ÊýµÄ²ÎÊýÖµ£¬¾Ö²¿±äÁ¿µÄÖµµÈ¡£Æä²Ù×÷·½Ê½ÀàËÆÓÚÊý¾Ý½á¹¹ÖеÄÕ»¡£³ÌÐò½áÊøʱÓɱàÒëÆ÷×Ô¶¯ÊÍ·Å¡£
2¡¢¶ÑÇø£¨h ......
pid_t pid=fork()
it has 3 situation for the return result pid
0 child
>0 parent process
<0 fork fail
fork create a new process and it parent live alse when the child process had been created ......
ÔÚÖƶ¨±ê׼ʱ£¬
C89
ίԱ»á¹Ø×¢ÏÂÁм¸¸öÔÔò£¬ÕâЩÔÔòÖ±µ½½ñÌ컹ÔÚÖ¸µ¼ÎÒÃÇ¿¼ÂÇÎÊÌâ¡£×îÖØÒªµÄ¼¸¸öÔÔòÈçÏ£º
ÏÖ´æ´úÂëºÜÖØÒª£¬¶øÏÖ´æµÄ
C
±àÒëÆ÷ʵÏÖ²¢²»ÖØÒª¡£
C
´úÂëÄܹ»ÊÇ¿ÉÒÆÖ²µÄ¡£
C
´úÂë¿ÉÒÔÊDz»¿ÉÒÆÖ²µÄ¡£
C89
ίԱ»á²»Ï£Íû×èÖ¹
C
³ÌÐòԱд»úÆ÷רÓôúÂ룬ÒòΪÕâÊÇ
C
µÄÒ»¸öÇ¿Ïî¡£ÕâÔì³ÉÁËÑϸñÒ» ......
ÍøÉÏÒ»µÀ½ðɽµÄÃæÊÔÌ⣺
http://topic.csdn.net/u/20100524/14/0eff992a-2849-4db6-bdaa-d4a200e79b7c.html
Çë·Ö±ðÓÃC++µÄÃæÏò¶ÔÏóºÍ·ºÐÍ»úÖÆ£¬±àдʵÏÖTemplate MethodģʽµÄʾÀý´úÂ룬²¢±È½ÏÁ½ÖÖ·½Ê½¸÷×ÔµÄÓÅȱµã¡£
ÓÃÐ麯ÊýʵÏÖTemplate MethodµÄ·½Ê½¾Í²»¶à˵ÁË¡£Ó÷ºÐ͵ķ½Ê½ÊµÏÖ¶à̬ÔÚATLÀïÃæÓдóÁ¿µÄÓõ½£¡
·ºÐ͵ ......