From f086447f2866194735ac39f023d75f2c04fba55c Mon Sep 17 00:00:00 2001 From: Klagarge Date: Tue, 12 Mar 2024 11:59:10 +0100 Subject: [PATCH] implement math approch for interpolation --- .../WaveformGenerator/hds/.cache.dat | Bin 4459 -> 4459 bytes .../Prefs/hds_user/v2019.2/hds_user_prefs | 2 +- .../Prefs/hds_user/v2019.2/hds_user_prefs.bak | 9 ++-- ...polatorCalculatePolynom_studentVersion.vhd | 44 ++++++++++++++++-- .../SplineInterpolator/hds/.cache.dat | Bin 6746 -> 6746 bytes .../hds/sine@gen/struct.bd.lck | 6 --- .../SplineInterpolator_test/hds/.cache.dat | Bin 1571 -> 1571 bytes 7 files changed, 45 insertions(+), 16 deletions(-) delete mode 100644 02-SplineInterpolator/SplineInterpolator/hds/sine@gen/struct.bd.lck diff --git a/01-WaveformGenerator/WaveformGenerator/hds/.cache.dat b/01-WaveformGenerator/WaveformGenerator/hds/.cache.dat index 4fdd97b0f6da5966658625b5dabcdffd4039ed47..57529abee8ed031b4347c204e9cbfffe3dfa6b90 100644 GIT binary patch delta 282 zcmaE@^jc{`A^XF}8Vn2(?vwl3T_*041ahMo7?^fUW@Pr6tih^Ejy zWMGKg0a7;kKcg~)AE*rG=Q626`L;m5>*RY(GR!w-Wl#RgRLcIEgN=cKv1f7sqx<9o z%u4JxR-Xi#Zv!^pltqjE?)Lpa`Hf)twJa)7c_*;E3abwL-96es`CPF4JXWAQ$Q^-( zV0(GlfbIaBXAf52%%;u!?DFTy8`(0LA3kQAEW@6|3{*e4n>`hxj`=oN-5)m2$vzw+ aK)+sQU=R=oiy82+Oz!0t*nFI02?qex4q*-e delta 282 zcmaE@^jc{`A^SVYdhM&lMGnjU#3!sd5k@i0~p;WA7EAjs@uW9z+?k9 z-;_lQ!e`tFmS4-F0+n|H%d4>JK;?76^7B|h@<4Y48iMWRWdpebWS%`(eKVUj*xrq7 z8O%U$O_pKL0rGn%ceAHL)G^-%tNX*oIoXFp1mZRUaj=*H56k3UZh_6mIhJq$01u;G AaR2}S diff --git a/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs b/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs index 231044f..2b12ebb 100644 --- a/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs +++ b/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs @@ -1280,8 +1280,8 @@ projectPaths [ "C:\\work\\repo\\edu\\sem\\labo\\solution\\sem_labs\\02-SplineInterpolator\\Prefs\\hds.hdp" "C:\\work\\edu\\sem\\labo\\sem_labs\\02-SplineInterpolator\\Prefs\\hds.hdp" "C:\\dev\\sem-labs\\02-SplineInterpolator\\Prefs\\hds.hdp" -"C:\\Users\\remi.heredero\\GIT\\2024-sem-labs-herederoremi\\02-SplineInterpolator\\Prefs\\hds.hdp" "C:\\Users\\uadmin\\GIT\\2024-sem-labs-herederoremi\\02-SplineInterpolator\\Prefs\\hds.hdp" +"C:\\Users\\remi.heredero\\GIT\\2024-sem-labs-herederoremi\\02-SplineInterpolator\\Prefs\\hds.hdp" ] libMappingsRootDir "" teamLibMappingsRootDir "" diff --git a/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs.bak b/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs.bak index 839e4f0..231044f 100644 --- a/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs.bak +++ b/02-SplineInterpolator/Prefs/hds_user/v2019.2/hds_user_prefs.bak @@ -1281,6 +1281,7 @@ projectPaths [ "C:\\work\\edu\\sem\\labo\\sem_labs\\02-SplineInterpolator\\Prefs\\hds.hdp" "C:\\dev\\sem-labs\\02-SplineInterpolator\\Prefs\\hds.hdp" "C:\\Users\\remi.heredero\\GIT\\2024-sem-labs-herederoremi\\02-SplineInterpolator\\Prefs\\hds.hdp" +"C:\\Users\\uadmin\\GIT\\2024-sem-labs-herederoremi\\02-SplineInterpolator\\Prefs\\hds.hdp" ] libMappingsRootDir "" teamLibMappingsRootDir "" @@ -4149,7 +4150,7 @@ hdsWorkspaceLocation "" relativeLibraryRootDir "" vmLabelLatestDontAskAgain 0 vmLabelWorkspaceDontAskAgain 0 -logWindowGeometry "600x573+405+95" +logWindowGeometry "600x573+406+95" diagramBrowserTabNo 0 showInsertPortHint 0 showContentFirstTime 0 @@ -6217,9 +6218,9 @@ size 180 ] displayHierarchy 0 xPos 0 -yPos 14 -width 1936 -height 1056 +yPos 4 +width 892 +height 982 activeSidePanelTab 2 activeLibraryTab 2 sidePanelSize 278 diff --git a/02-SplineInterpolator/SplineInterpolator/hdl/interpolatorCalculatePolynom_studentVersion.vhd b/02-SplineInterpolator/SplineInterpolator/hdl/interpolatorCalculatePolynom_studentVersion.vhd index b38014d..eb44fce 100644 --- a/02-SplineInterpolator/SplineInterpolator/hdl/interpolatorCalculatePolynom_studentVersion.vhd +++ b/02-SplineInterpolator/SplineInterpolator/hdl/interpolatorCalculatePolynom_studentVersion.vhd @@ -1,20 +1,54 @@ ARCHITECTURE studentVersion OF interpolatorCalculatePolynom IS -subtype sample_type is signed(sampleIn'range); -type samples_type is array (1 to 4) of sample_type; -signal samples: samples_type; +subtype sample_type is signed(coeffBitNb-1+oversamplingBitNb DOWNTO 0); +type order0 is array (0 to 0) of sample_type; +type order1 is array (0 to 1) of sample_type; +type order2 is array (0 to 2) of sample_type; +type order3 is array (0 to 3) of sample_type; +signal cA: order3; +signal cB: order2; +signal cC: order1; +signal cD: order0; BEGIN process(clock, reset) begin if reset = '1' then - samples <= (others => (others => '0')); + cA <= (others => (others => '0')); + cB <= (others => (others => '0')); + cC <= (others => (others => '0')); + cD <= (others => (others => '0')); elsif rising_edge(clock) then + if restartPolynom = '1' then + cA(3) <= (others => '0'); + cA(2) <= (others => '0'); + cA(1) <= (others => '0'); + cA(0) <= resize(a,sample_type'high+1); + + cB(2) <= (others => '0'); + cB(1) <= (others => '0'); + cB(0) <= resize(b,sample_type'high+1); + + cC(1) <= (others => '0'); + cC(0) <= resize(c,sample_type'high+1); + cD(0) <= resize(d,sample_type'high+1); + + else + cC(1) <= resize(c,sample_type'high+1) + cC(1); + + cB(2) <= cB(2) + resize(2*cB(1),sample_type'high+1) + b; + cB(1) <= resize(b,sample_type'high+1) + cB(1); + + cA(3) <= cA(3) + resize(3*cA(2),sample_type'high+1) + resize(3*cA(1),sample_type'high+1) + a; + cA(2) <= cA(2) + resize(2*cA(1),sample_type'high+1) + a; + cA(1) <= resize(A,sample_type'high+1) + cA(1); + + end if; end if; end process; - sampleOut <= (others => '0'); + sampleOut <= resize(cA(3)+cB(2)+cC(1)+cD(0),signalBitNb); END ARCHITECTURE studentVersion; diff --git a/02-SplineInterpolator/SplineInterpolator/hds/.cache.dat b/02-SplineInterpolator/SplineInterpolator/hds/.cache.dat index a71f5500721b8d003b5ce30ed1298fa5c61ce351..8bddfeccc63debb56375a06128cd10b9dcd839cd 100644 GIT binary patch delta 341 zcmca*a?4~wC-aRN7bo@tZJsFVCC%WS`cZ52C(va zb_obSNF1d65xXSV=6~!!7v2_SU|?DbR<@Tz671KT92pShNr@okJ)8<);q{z3U|NnV u5n>y264 delta 341 zcmca*a?4~wC-akOy%T$iK-6SL#u9cQ&A^cIapDA*$p;u!A>6QAAg%$E9`ifN{K<(- zZS3zPvl$o|x+cG4Dg?6g85mf6CMR(FOy0z7#QsitD+2@bS)iQzWFr=Bu$}~#W}tW? z0|V13u=oK+-pO{X5)i#i4Pd=1S#{ap$+!a5NPyL-uqi{V5A*?9KZ#8Vs@xH*oSj_@ zBF)eMR$k980pSOUgOopFmjv7Vj~(hlrlnwIdpRV*e!a<&0a2cm2vXj|sQ?yU&zS?J s<+u_dwlODxZM(z;G)~5S@;k0uc#01}gTY5)KL diff --git a/02-SplineInterpolator/SplineInterpolator/hds/sine@gen/struct.bd.lck b/02-SplineInterpolator/SplineInterpolator/hds/sine@gen/struct.bd.lck deleted file mode 100644 index 440dbc4..0000000 --- a/02-SplineInterpolator/SplineInterpolator/hds/sine@gen/struct.bd.lck +++ /dev/null @@ -1,6 +0,0 @@ -EDIT_LOCK -remi.heredero -UNKNOWN -WE2330808 -17492 -08.03.2024-12:51:15.116000 diff --git a/02-SplineInterpolator/SplineInterpolator_test/hds/.cache.dat b/02-SplineInterpolator/SplineInterpolator_test/hds/.cache.dat index 9b8b2107484251fc727d916de007852a9c6d5d4a..74fb04bc67444de2ee8cf710727d849ce89a432a 100644 GIT binary patch delta 93 zcmZ3?vzTW>HS>)b7bn(bgQ+(eAZl_rV=nu%{oV`=j9Qb|GWkqi!N?HS?2cy%X!Q!PJ`!5H&fRF_-