URL
https://opencores.org/ocsvn/artificial_neural_network/artificial_neural_network/trunk
Subversion Repositories artificial_neural_network
Compare Revisions
- This comparison shows the changes necessary to convert path
/artificial_neural_network
- from Rev 11 to Rev 12
- ↔ Reverse comparison
Rev 11 → Rev 12
/trunk/ANN_kernel/RTL_VHDL_files/support_pkg.vhd
4,8 → 4,6
use work.layers_pkg.all; |
package support_pkg is |
|
-- generic constants: |
|
constant NbitIn : natural := 12; |
constant LSB_In : natural := 8; |
constant Nbit : natural := 12; |
/trunk/test_bench/octave/wb_gen.m
35,19 → 35,19
fprintf(fileid,' %i => (\n',i-1); |
for(j=1:size(cell2mat(wbMat(k,1)),1)) % inputs |
fprintf(fileid,' %i => real2stdlv(NbitW,%1.4f)',j-1, cell2mat(wbMat(k,1))(j,i)); |
if j != size(cell2mat(wbMat(k,1)),1) |
if j ~= size(cell2mat(wbMat(k,1)),1) |
fprintf(fileid,',\n'); |
else |
fprintf(fileid,',\n others =>(others => ''0'')\n'); |
end; |
end; |
if i != size(cell2mat(wbMat(k,1)),2) |
if i ~= size(cell2mat(wbMat(k,1)),2) |
fprintf(fileid,' ),\n'); |
else |
fprintf(fileid,' ),\n others=>(others =>(others => ''0''))\n'); |
end; |
end; |
if k != NLayers |
if k ~= NLayers |
fprintf(fileid,' ),\n'); |
else |
fprintf(fileid,' )\n'); |
61,13 → 61,13
fprintf(fileid,' %i => (\n',k-1); |
for(j=1:length(cell2mat(wbMat(k,2)))) % inputs |
fprintf(fileid,' %i => real2stdlv(NbitW,(2.0**LSB_OUT)*(%1.4f))',j-1, cell2mat(wbMat(k,2))(j)); |
if j != length(cell2mat(wbMat(k,2))) |
if j ~= length(cell2mat(wbMat(k,2))) |
fprintf(fileid,',\n'); |
else |
fprintf(fileid,',\n others =>(others => ''0'')\n'); |
end; |
end; |
if k != NLayers |
if k ~= NLayers |
fprintf(fileid,' ),\n'); |
else |
fprintf(fileid,' )\n'); |
75,43 → 75,5
end; |
fprintf(fileid,' );\n'); |
|
|
% fprintf(fileid,' constant b0_init : ramd_type0 :=\n'); |
% fprintf(fileid,' (\n'); |
% for(i=1:length(nn_data.b1)) |
% fprintf(fileid,' %i => real2stdlv(NbitW,(2.0**LSB_OUT)*(%.4f))',i-1,nn_data.b1(i)); |
% if i != length(nn_data.b1) |
% fprintf(fileid,',\n'); |
% else |
% fprintf(fileid,'\n'); |
% end; |
|
% end; |
% fprintf(fileid,' );\n'); |
|
% fprintf(fileid,' constant b1_init : ramd_type1 :=\n'); |
% fprintf(fileid,' (\n'); |
% for(i=1:length(nn_data.b2)) |
% fprintf(fileid,' %i => real2stdlv(NbitW,(2.0**LSB_OUT)*(%.4f))',i-1,nn_data.b2(i)); |
% if i != length(nn_data.b2) |
% fprintf(fileid,',\n'); |
% else |
% fprintf(fileid,'\n'); |
% end; |
% end; |
% fprintf(fileid,' );\n'); |
|
% fprintf(fileid,' constant b2_init : ramd_type2 :=\n'); |
% fprintf(fileid,' (\n'); |
% for(i=1:length(nn_data.b3)) |
% fprintf(fileid,' %i => real2stdlv(NbitW,(2.0**LSB_OUT)*(%.4f))',i-1,nn_data.b3(i)); |
% if i != length(nn_data.b3) |
% fprintf(fileid,',\n'); |
% else |
% fprintf(fileid,'\n'); |
% end; |
% end; |
% fprintf(fileid,' );\n'); |
|
fprintf(fileid,'end wb_init;\n'); |
fclose(fileid); |