Commit 8e0c3d70 authored by tsharith's avatar tsharith
Browse files

WE HAVE EXTRUSION! ~.~

parent 73535fd7
......@@ -57,13 +57,13 @@ ENDLIST
LIST FileManager
VALUE "<project>\component\Actel\DirectCore\CoreAPB3\4.1.100\CoreAPB3.cxf,actgen_cxf"
STATE="utd"
TIME="1555874679"
TIME="1555893534"
SIZE="2736"
PARENT="<project>\component\work\SB_Integration\SB_Integration.cxf"
ENDFILE
VALUE "<project>\component\Actel\DirectCore\CoreAPB3\4.1.100\coreparameters.v,tb_hdl"
STATE="utd"
TIME="1555874679"
TIME="1555893534"
SIZE="1284"
PARENT="<project>\component\Actel\DirectCore\CoreAPB3\4.1.100\CoreAPB3.cxf"
IS_READONLY="TRUE"
......@@ -152,7 +152,7 @@ IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS\2.5.200\MSS.cxf,actgen_cxf"
STATE="utd"
TIME="1555874653"
TIME="1555883767"
SIZE="945"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
......@@ -170,97 +170,97 @@ IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_ACE\2.2.100\MSS_ACE.cxf,actgen_cxf"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_CCC\2.0.106\MSS_CCC.cxf,actgen_cxf"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_CM3\1.0.200\MSS_CM3.cxf,actgen_cxf"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_COM\1.0.200\MSS_COM.cxf,actgen_cxf"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_DMA\1.0.101\MSS_DMA.cxf,actgen_cxf"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_ENVM\2.3.200\MSS_ENVM.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="253"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_FIC\1.0.101\MSS_FIC.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_FIO\1.0.203\MSS_FIO.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_GPIO\1.0.101\MSS_GPIO.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="253"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_INTR\1.0.101\MSS_INTR.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="253"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_RESET\1.0.101\MSS_RESET.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="254"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_RTC\1.0.100\MSS_RTC.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="252"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_TIMER\1.0.100\MSS_TIMER.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="254"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_UART\1.0.101\MSS_UART.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="253"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\Actel\SmartFusionMSS\MSS_UFROM\1.0.100\MSS_UFROM.cxf,actgen_cxf"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="254"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\work\DESIGN_FIRMWARE\DESIGN_FIRMWARE.cxf,actgen_cxf"
STATE="utd"
TIME="1555874649"
TIME="1555888826"
SIZE="2374"
ENDFILE
VALUE "<project>\component\work\DESIGN_IO\DESIGN_IO.cxf,actgen_cxf"
......@@ -270,13 +270,13 @@ SIZE="413"
ENDFILE
VALUE "<project>\component\work\SB_Integration\SB_Integration.cxf,actgen_cxf"
STATE="utd"
TIME="1555874682"
TIME="1555893537"
SIZE="7263"
ENDFILE
VALUE "<project>\component\work\SB_Integration\SB_Integration.pdc,pdc"
STATE="utd"
TIME="1555874678"
SIZE="1202"
TIME="1555893533"
SIZE="1497"
PARENT="<project>\component\work\SB_Integration\SB_Integration.cxf"
BEGIN_USE_CONSTRAINT
TOOL_CONSTRAINT_TYPE="ideDESIGNER"
......@@ -286,41 +286,41 @@ IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_Integration\SB_Integration.v,hdl"
STATE="utd"
TIME="1555874679"
SIZE="19302"
TIME="1555893534"
SIZE="19037"
PARENT="<project>\component\work\SB_Integration\SB_Integration.cxf"
IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\MSS_ACE_0\MSS_ACE_0.log,???"
STATE="utd"
TIME="1555874650"
TIME="1555888826"
SIZE="31587"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\MSS_CCC_0\SB_MSS_tmp_MSS_CCC_0_MSS_CCC.cxf,actgen_cxf"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="479"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\component\work\SB_MSS\MSS_CCC_0\SB_MSS_tmp_MSS_CCC_0_MSS_CCC.v,hdl"
STATE="utd"
TIME="1555874650"
TIME="1555883764"
SIZE="2879"
PARENT="<project>\component\work\SB_MSS\MSS_CCC_0\SB_MSS_tmp_MSS_CCC_0_MSS_CCC.cxf"
IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\MSS_ENVM_0\MSS_ENVM_0.efc,efc"
STATE="utd"
TIME="1555874652"
TIME="1555888826"
SIZE="18054"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\mss_tshell.v,hdl"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="12226"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
BEGIN_USE_CONSTRAINT
......@@ -332,7 +332,7 @@ IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
STATE="utd"
TIME="1555874652"
TIME="1555883766"
SIZE="184"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
BEGIN_USE_CONSTRAINT
......@@ -344,12 +344,12 @@ IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\SB_MSS.cxf,actgen_cxf"
STATE="utd"
TIME="1555874654"
TIME="1555888826"
SIZE="14032"
ENDFILE
VALUE "<project>\component\work\SB_MSS\SB_MSS.pdc,pdc"
STATE="utd"
TIME="1555874646"
TIME="1555888826"
SIZE="1046"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
BEGIN_USE_CONSTRAINT
......@@ -360,59 +360,59 @@ IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\component\work\SB_MSS\SB_MSS.v,hdl"
STATE="utd"
TIME="1555874653"
TIME="1555888826"
SIZE="21255"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
IS_READONLY="TRUE"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration.adb,adb"
STATE="utd"
TIME="1555861168"
SIZE="1775616"
TIME="1555888826"
SIZE="1935360"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration.fdb,fdb"
STATE="utd"
TIME="1555874776"
SIZE="81932"
TIME="1555893672"
SIZE="80227"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration.ide_des,ide_des"
STATE="utd"
TIME="1555869127"
SIZE="1431"
TIME="1555888826"
SIZE="1522"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_compile_log.rpt,log"
STATE="utd"
TIME="1555861168"
SIZE="30322"
TIME="1555893618"
SIZE="30231"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_fp\projectData\SB_Integration.pdb,pdb"
STATE="utd"
TIME="1555861168"
SIZE="82550"
TIME="1555888826"
SIZE="88046"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_fp\SB_Integration.pdb,pdb"
STATE="utd"
TIME="1555861168"
SIZE="82550"
TIME="1555888826"
SIZE="88046"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_fp\SB_Integration.pro,pro"
STATE="utd"
TIME="1555869127"
SIZE="2617"
TIME="1555888498"
SIZE="2686"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_placeroute_log.rpt,log"
STATE="utd"
TIME="1555874761"
SIZE="14236"
TIME="1555893658"
SIZE="14262"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_prgdata_log.rpt,log"
STATE="utd"
TIME="1555874777"
TIME="1555893673"
SIZE="1048"
ENDFILE
VALUE "<project>\designer\impl1\SB_Integration_verifytiming_log.rpt,log"
STATE="utd"
TIME="1555874766"
TIME="1555893663"
SIZE="3262"
ENDFILE
VALUE "<project>\designer\impl1\spi_master.adb,adb"
......@@ -432,28 +432,28 @@ SIZE="7780"
ENDFILE
VALUE "<project>\hdl\extruder_Drive.v,hdl"
STATE="utd"
TIME="1555861168"
SIZE="2694"
TIME="1555893376"
SIZE="2399"
ENDFILE
VALUE "<project>\hdl\hotend_temp.v,hdl"
STATE="utd"
TIME="1555861168"
TIME="1555888826"
SIZE="6036"
ENDFILE
VALUE "<project>\hdl\PID.v,hdl"
STATE="utd"
TIME="1555861168"
TIME="1555888826"
SIZE="1921"
ENDFILE
VALUE "<project>\hdl\SPI_master.v,hdl"
STATE="utd"
TIME="1555861168"
TIME="1555890173"
SIZE="2574"
ENDFILE
VALUE "<project>\hdl\stepper.v,hdl"
STATE="utd"
TIME="1555861168"
SIZE="2687"
TIME="1555893449"
SIZE="2831"
ENDFILE
VALUE "<project>\hdl\timer.v,hdl"
STATE="utd"
......@@ -480,13 +480,13 @@ PARENT="<project>\component\Actel\DirectCore\CoreAPB3\4.1.100\CoreAPB3.cxf"
ENDFILE
VALUE "<project>\simulation\subsystem.bfm,sim"
STATE="utd"
TIME="1555874679"
TIME="1555893534"
SIZE="705"
PARENT="<project>\component\work\SB_Integration\SB_Integration.cxf"
ENDFILE
VALUE "<project>\simulation\test.bfm,sim"
STATE="utd"
TIME="1555874651"
TIME="1555888826"
SIZE="12569"
PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
......@@ -498,23 +498,23 @@ PARENT="<project>\component\work\SB_MSS\SB_MSS.cxf"
ENDFILE
VALUE "<project>\synthesis\SB_Integration.edn,syn_edn"
STATE="utd"
TIME="1555861168"
SIZE="1076259"
TIME="1555888826"
SIZE="1174511"
ENDFILE
VALUE "<project>\synthesis\SB_Integration.so,so"
STATE="utd"
TIME="1555861168"
SIZE="296"
TIME="1555888365"
SIZE="319"
ENDFILE
VALUE "<project>\synthesis\SB_Integration_sdc.sdc,syn_sdc"
STATE="utd"
TIME="1555861168"
TIME="1555888365"
SIZE="530"
ENDFILE
VALUE "<project>\synthesis\SB_Integration_syn.prj,prj"
STATE="utd"
TIME="1555869127"
SIZE="4167"
TIME="1555888826"
SIZE="4535"
ENDFILE
VALUE "<project>\synthesis\spi_master.edn,syn_edn"
STATE="ood"
......@@ -533,7 +533,7 @@ SIZE="401"
ENDFILE
VALUE "<project>\synthesis\spi_master_syn.prj,prj"
STATE="utd"
TIME="1555861225"
TIME="1555869164"
SIZE="0"
ENDFILE
ENDLIST
......@@ -548,24 +548,6 @@ VALUE "<project>\component\work\SB_Integration\SB_Integration.pdc,pdc"
ENDLIST
LIST SynthesisConstraints
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
VALUE "<project>\component\work\SB_MSS\mss_tshell_syn.sdc,sdc"
ENDLIST
LIST ProjectState5.1
LIST Impl1
......@@ -794,7 +776,10 @@ ReportsCurrentItem;Program Device:SB_Integration_program.log
StartPage;StartPage;0
SmartDesign;SB_Integration;0
SmartDesign;SB_MSS;0
ACTIVEVIEW;SB_MSS
HDL;hdl\SPI_master.v;0
HDL;hdl\stepper.v;0
HDL;hdl\extruder_Drive.v;0
ACTIVEVIEW;Reports
ENDLIST
LIST ModuleSubBlockList
LIST "BIBUF_MSS::work","component\Actel\SmartFusionMSS\MSS\2.5.200\mss_comps.v","FALSE","FALSE"
......
......@@ -2,3 +2,4 @@
*** SESSION Apr 21, 2019 14:53:29.64 -------------------------------------------
*** SESSION Apr 21, 2019 14:53:51.64 -------------------------------------------
*** SESSION Apr 21, 2019 15:52:24.69 -------------------------------------------
*** SESSION Apr 21, 2019 19:24:22.25 -------------------------------------------
#include "locomotion.h"
#include "printing.h"
#include "drivers/mss_ace/mss_ace.h"
#include "drivers/mss_pdma/mss_pdma.h"
#include "drivers/mss_timer/mss_timer.h"
const int timerPeriod=1000000*1000/2;
uint tempC=0;
void Timer1_IRQHandler( void ){
move_forward(100);
*((uint32_t*) 0x40050014) = 0xffff9a65;
/*
if(states_remaining!=0){
MSS_TIM1_init(MSS_TIMER_ONE_SHOT_MODE);
MSS_TIM1_load_immediate(timerPeriod);
MSS_TIM1_start();
MSS_TIM1_enable_irq();
}
if(states_remaining == 0) {
MSS_TIM1_stop();
MSS_GPIO_set_outputs(0);
}
*/
MSS_TIM1_clear_irq();
}
void Timer2_IRQHandler( void ){
double percent = (double)Steps_taken/Required_steps;
percent *= 100;
uint8_t tx_buf[2];
sprintf(tx_buf, "%i", (uint8_t)percent);
tx_buf[1]=tempC;
MSS_UART_polled_tx( &g_mss_uart1, tx_buf, sizeof(tx_buf) );
MSS_TIM2_clear_irq();
}
void reportTemp() {
MSS_TIM2_init(MSS_TIMER_PERIODIC_MODE);
MSS_TIM2_load_immediate(100000000);
MSS_TIM2_start();
MSS_TIM2_enable_irq();
}
void move() {
MSS_TIM1_init(MSS_TIMER_PERIODIC_MODE);
MSS_TIM1_load_immediate(timerPeriod);
MSS_TIM1_start();
MSS_TIM1_enable_irq();
}
int getTemp(double voltage){
if(voltage>2.109) return -84.532*voltage+327.26;
else {
return 289.87*exp(-0.353*voltage);
}
}
int main()
{
MSS_UART_init(&g_mss_uart1, MSS_UART_115200_BAUD,
MSS_UART_DATA_8_BITS | MSS_UART_NO_PARITY | MSS_UART_ONE_STOP_BIT);
reportTemp();
wait();
NVIC_EnableIRQ(GPIO0_IRQn);
MSS_GPIO_config( MSS_GPIO_0, MSS_GPIO_INPUT_MODE | MSS_GPIO_IRQ_EDGE_POSITIVE );
MSS_GPIO_enable_irq( MSS_GPIO_0 );
// PDMA_init();
/*PDMA_configure(
PDMA_CHANNEL_0,
PDMA_FROM_ACE,
PDMA_LOW_PRIORITY | PDMA_WORD_TRANSFER | PDMA_INC_DEST_FOUR_BYTES,
PDMA_DEFAULT_WRITE_ADJ
);
uint32_t holder;
PDMA_start(
PDMA_CHANNEL_0,
PDMA_ACE_PPE_DATAOUT,
((uint32_t)HE_Base + SCALED_SP),
sizeof(holder)
);*/
uint therm=0;
uint hotEndStatus=0;
double voltage=1;
init_loco();
init_print();
while(1)
{
extrude(-4190);
printf("%d",tempC);
therm = get_raw_thermistor();
voltage=((double)therm)/4096.0*2.56;
tempC=getTemp(voltage);
// *(uint32_t*)((uint32_t)EX_Base + STEPS) = 50;
if (tempC>190)
hotEndStatus=0;
else if (tempC<180)
hotEndStatus=1;
else {
int randNum=(double)rand()/RAND_MAX*10;
if(randNum<(190-tempC))
hotEndStatus=1;
else
hotEndStatus=0;
}
set_hotend_switch(hotEndStatus);
int i=0;
for(i=0;i<1000000;++i);
}
// // DEBUG BEGIN
// uint32_t experiod, scaledsp, pidkp, pidki, pidkd, sens, therm, pidsp;
// char automode, sw, fan;
// experiod = get_extruder_period();
// automode = get_hotend_auto();
// scaledsp = get_hotend_sp();
// sw = get_hotend_switch();
// fan = get_hotend_fan();
// pidkp = get_hotend_pid_k(KP);
// pidki = get_hotend_pid_k(KI);
// pidkd = get_hotend_pid_k(KD);
// sens = get_hotend_pid_sensitivity();
// therm = get_raw_thermistor();
// pidsp = get_pid_sp();
// // DEBUG END
char hotendTog = 1, fanTog = 1;
move();
while( 1 )
{
uint8_t buf[] = "20\n\r";
MSS_UART_polled_tx(&g_mss_uart0, buf, sizeof(buf));
/*
extrude(1);
// DEBUG BEGIN
experiod = get_extruder_period();
automode = get_hotend_auto();
scaledsp = get_hotend_sp();
sw = get_hotend_switch();
fan = get_hotend_fan();