Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
4 cores/namuru/rtl/namuru_accumulator.v
@@ -63,8 +63,8 @@ module accumulator (clk, rstn, sample_enable, code, carrier_mix_sign, carrier_mi
end
else if (dump_enable)
begin
- accumulation = accum_i; // buffer the accumultion...
- accum_i = 0; // then reset the accumulation
+ accumulation <= accum_i; // buffer the accumultion...
+ accum_i <= 0; // then reset the accumulation
end
else if (sample_enable) // 20 MHz rate
begin
View
4 cores/namuru/rtl/namuru_baseband.v
@@ -88,6 +88,7 @@ time_base tb (
.pre_tic_enable(pre_tic_enable),
.tic_enable(tic_enable),
.accum_enable(accum_enable_s),
+// .accum_sample_enable(accum_sample_enable),
.tic_count(tic_count),
.accum_count(accum_count)
);
@@ -99,7 +100,7 @@ assign rstn = ~correlator_rst & ~sw_rst;
tracking_channel tc0 (
.clk(correlator_clk),
.rstn(rstn),
- .accum_sample_enable(accum_sample_enable),
+ .accum_sample_enable(1'b1),
.if_sign(sign),
.if_mag(mag),
.pre_tic_enable(pre_tic_enable),
@@ -193,6 +194,7 @@ always @(posedge correlator_clk) begin
status_read <= 1'b0;
new_data_read <= 1'b0;
+ ch0_prn_key_enable <= 1'b0;
if(next_csr_we) begin
/* write */
case(wb_adr_i[9:2])
View
51 software/bios/main.c
@@ -65,12 +65,14 @@ enum {
#define CH0_EPOCH (0xa0000030)
#define CH0_EPOCH_CHECK (0xa0000034)
#define CH0_EPOCH_LOAD (0xa0000038)
+#define CH0_ENABLES (0xa000003c)
/* Status */
#define STATUS (0xa0000380)
#define NEW_DATA (0xa0000384)
#define TIC_COUNT (0xa0000388)
#define ACCUM_COUNT (0xa000038c)
+#define CLEAR_STATUS (0xa0000390)
#define HW_ID (0xa00003bc)
/* Control */
@@ -153,8 +155,14 @@ static void namuruinit()
char *c;
printf("\n");
printf("Initializing Correlator: \n");
+ /* prog tic*/
+ MM_WRITE(PROG_TIC,0x18ffff);
+ printf("Prog TIC\n");
+ /* prog accum int*/
+ MM_WRITE(PROG_ACCUM_INT,0x1fff);
+ printf("Accum TIC\n");
/* prn */
- MM_WRITE(CH0_PRN_KEY,0x096);
+ MM_WRITE(CH0_PRN_KEY,0x300);
printf("CH0 PRN Key \n");
/* carrier nco */
MM_WRITE(CH0_CARRIER_NCO,0x9f0000);
@@ -165,33 +173,49 @@ static void namuruinit()
/* code slew */
MM_WRITE(CH0_CODE_SLEW,0x400); // this will be based upon a variable
printf("CH0 Code SLEW\n");
+ /* logic enable */
+ MM_WRITE(CH0_ENABLES,0xff);
+ printf("CH0 LOGIC ENABLED\n");
/* epoch load */
MM_WRITE(CH0_EPOCH_LOAD,0xff);
printf("CH0 Epoch Load\n");
- /* prog tic*/
- MM_WRITE(PROG_TIC,0x18ffff);
- printf("Prog TIC\n");
- /* prog accum int*/
- MM_WRITE(PROG_ACCUM_INT,0x1fff);
- printf("Accum TIC\n");
printf("Done\n");
}
+static void namurumeasure()
+{
+ char *c;
+ while(1)
+ {
+ MM_WRITE(CLEAR_STATUS,0x0f);
+ if(readchar_nonblock())
+ {
+ c = readchar();
+ if(c == 'q')
+ break;
+ }
+ }
+ printf("Bye\n");
+}
static void namuruaccum()
{
+ char *c;
printf("Accumulators: \n");
printf("I_E\tQ_E\tI_P\tQ_P\tI_L\tQ_L\n");
/* missing polling accum int pin */
while(1)
{
- printf("%02x\t%02x\t%02x\t%02x\t%02x\t%02x\n",(MM_READ(CH0_I_EARLY)),(MM_READ(CH0_Q_EARLY)),(MM_READ(CH0_I_PROMPT)),(MM_READ(CH0_Q_PROMPT)),(MM_READ(CH0_I_LATE)),(MM_READ(CH0_Q_LATE)));
+ printf("%02d\t%02d\t%02d\t%02d\t%02d\t%02d\n",(MM_READ(CH0_I_EARLY)),(MM_READ(CH0_Q_EARLY)),(MM_READ(CH0_I_PROMPT)),(MM_READ(CH0_Q_PROMPT)),(MM_READ(CH0_I_LATE)),(MM_READ(CH0_Q_LATE)));
+ MM_WRITE(CLEAR_STATUS,0x0f);
+ MM_WRITE(CH0_ENABLES,0xff);
if(readchar_nonblock())
{
c = readchar();
if(c == 'q')
break;
}
- accum}
+ }
printf("\n");
+
}
static void namurustatus()
@@ -199,10 +223,12 @@ static void namurustatus()
char *c;
printf("\n");
printf("Status: \n");
- printf("TIC_COUNT\tACCUM_COUNT\tCARRIER_MEASURE\tCODE_MEASURE\tSTATUS\n");
+ printf("TIC_COUNT\tACCUM_COUNT\tCARRIER_MEASURE\tCODE_MEASURE\tSTATUS\tNEW_DATA\n");
while(1)
{
- printf("%02d\t\t%02d\t\t%02d\t\t%02d\t\t%02d\n",(MM_READ(TIC_COUNT)),(MM_READ(ACCUM_COUNT)),(MM_READ(CH0_CARRIER_MEASUREMENT)),(MM_READ(CH0_CODE_MEASUREMENT)),(MM_READ(STATUS)));
+ printf("%02d\t\t%02d\t\t%02d\t\t%02d\t\t%02d\t\t%02d\n",(MM_READ(TIC_COUNT)),(MM_READ(ACCUM_COUNT)),(MM_READ(CH0_CARRIER_MEASUREMENT)),(MM_READ(CH0_CODE_MEASUREMENT)),(MM_READ(STATUS)),(MM_READ(NEW_DATA)));
+ MM_WRITE(CLEAR_STATUS,0x0f);
+ MM_WRITE(CH0_ENABLES,0xff);
if(readchar_nonblock())
{
c = readchar();
@@ -210,6 +236,7 @@ static void namurustatus()
break;
}
}
+ MM_WRITE(STATUS,0x0); //clear status_read flag
printf("\n");
}
@@ -541,6 +568,7 @@ static void help()
puts("reconf - reload FPGA configuration");
puts("namuruinit - init basic essential registers");
puts("namurustatus - dump status to screen");
+ puts("namurumeasure - no dump,measure TPs with scope ");
puts("namuruaccum - dump accumlators to screen");
puts("memtest1 - memory speed test, use a stopwatch!");
}
@@ -593,6 +621,7 @@ static void do_command(char *c)
else if(strcmp(token, "namuruinit") == 0) namuruinit();
else if(strcmp(token, "namurustatus") == 0) namurustatus();
+ else if(strcmp(token, "namurumeasure") == 0) namurumeasure();
else if(strcmp(token, "namuruaccum") == 0) namuruaccum();
else if(strcmp(token, "memtest1") == 0) memtest1();

No commit comments for this range

Something went wrong with that request. Please try again.