求助:VHDL过程调用出错!帮检查一下!十分感谢!
- UID
- 137162
- 性别
- 男
|
求助:VHDL过程调用出错!帮检查一下!十分感谢!
PACKAGE data_types IS SUBTYPE data_element IS integer range 0 to 3; TYPE data_array IS ARRAY (1 to 3) OF data_elment; END data_types; USE work.data_types.all; ENTITY c IS  ORT( a: IN data_array; b : OUT data_arry); END c; ARCHITECTURE a OF c IS BEGIN PROCESS (a) procedure swap(data:inout data_array; l,h:in integer) is VARIABLE temp: data_array; begin if (data(l)>data(h) then temp:=data(l); data(l):=data(h); data(h):=temp; end if; end swap; VARIABLE c: data_array; BEGIN c:=a; swap(a,1,2); swap(a,2,3); swap(a,1,2); b<=c; END PROCESS;
END a; 是一个通过过程的功能对一个数组中的两个元素进行比较的程序!但有错误,哪位大侠帮个忙!谢谢! |
|
|
|
|
|