GalD101
-
Posts
107 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by GalD101
-
-
Hurray!
That's the code. Not very pretty and I know I can use an else without an "else if" but during my debugging progress I added that and I found a few bugs when writing it.
Also, the off-by-one error was present since I hard-coded those numbers and made a mistake when copying them.
Yes, I know it's a bad practice to leave numbers that seem random in a program instead of using localparams or simply writing them as a multiple of 868 (while keeping 868 as a constant) but I am going to try to change it anyway so it would say "Hello World!".
I'll also add the small drawing I made, It's not very readable but that was the way I thought about implementing it. I think there are cleverer ways to implement this but this was my naive approach for this. Let me know if there are better ways to implement it (other than obviously making my "if" and "else if" conditions a bit cleaner).
Perhaps a better approach is to create an fsm for every letter? and on every instance give it a parameter of how many characters I want to display and thus creating another layer of abstraction? Is that type of approach good or is it not practical?note: doing this instead of data structures hw because it's fun lol
-
Missed by one bit! (off by one error again lol)
-
-
"Our preliminary estimation is that if we are able to measure 100 coincidences per second, our measurement time becomes ~4-5 hours to get a target level of confidence of 4 sigma. The question now is how many coincidences do we expect to have out of single events. This is a more tricky question that we are trying to estimate now. It seems that we need to target the count rate of 100 000 single events per seconds."
-
He said it's as simple as pressing a button to generate less photons per seconds. Please excuse me if I misunderstood your question
22 hours ago, reddish said:I would like to see the calculation that supports this
-
-
He said we can do what you suggested here
9 minutes ago, reddish said:attenuate the laser down to a lower level where the number of expected coincidences is 15e3, and still get useful statistics.
-
Unfortunately I don't have a definitive answer as to how many coincidences we expect to capture in one second but I'll try to figure out by asking some folks here. For now all that I know is that the max is 20M so anything above that would be redundant.
-
1 hour ago, reddish said:
we can stop
why stop?
-
9 minutes ago, GalD101 said:
"The single photon detector dead time is about 50ns therefore we do not need to measure faster than 20MHz. The system should be ready to count the coincidence rate as high as 20MHz."
Note that this is the maximum so my prof would like me to build a system that can handle the max, but it would be OK if it would be a bit less than the max
-
1 hour ago, reddish said:
This is the point where you should get a ballpark number for the number of photons and/or coincidences that you expect per second
"The single photon detector dead time is about 50ns therefore we do not need to measure faster than 20MHz. The system should be ready to count the coincidence rate as high as 20MHz."
-
1 hour ago, reddish said:
the 2 E's are the status of some pins.
What will this status represent?
1 hour ago, reddish said:Each character will take 9 baud periods
Why 9? Is it because each character is 4 bits so you doubled it and added 1 for the
paritystop bit?1 hour ago, reddish said:at 7N1
7N1 means 1 start bit, 7 bits of data No parity bit and 1 stop bit?
1 hour ago, reddish said:So that's 108 baud periods per event.
Why 108?
1 hour ago, reddish said:At 4 Mbaud, this could handle about 37,000 events per second.
Because 4M / 108 approximately equals to 37,000?
1 hour ago, reddish said:That's 26 characters or 234 baud periods per message
Why 234?
1 hour ago, reddish said:meaning you could handle upward of 17,000
because 4M / 234 approximately equals to 17,000?
1 hour ago, reddish said:This is the point where you should get a ballpark number for the number of photons and/or coincidences that you expect per second
I asked my prof for this, he said he needs to check so I'll update you when I have an answer
-
according to what you said I think I should modify it like so:
wire [10:0] next_counter = (r_counter + 1) % (11'd1736);
wire next_fsm_out = (next_counter < 10'd868) ? 1'b1 : 1'b0;(changed 867 to 868)
-
3 minutes ago, reddish said:
No, it does not work identically.
You never got to the point where you identified the off-by-one bug that I claim is in the second line. Please stare at that second line intently for a bit, and tell me what's wrong.that's weird because I programmed the device with it and it seems to show the same behavior. I probably missed something when compiling. Thanks for letting me know I'll check
-
59 minutes ago, GalD101 said:
My mistake, it's similar to the program you wrote but I changed the values of HI and LO to 868 and NUM_COUNTER_BITS to 11
localparam HI = 868;
localparam LO = 868;
localparam NUM_COUNTER_BITS = 11;It also works identical with the Verilog (not SystemVerilog) code after I modified these lines
wire [10:0] next_counter = (r_counter + 1) % (11'd1736);
wire next_fsm_out = (next_counter < 10'd867) ? 1'b1 : 1'b0; -
I know you are writing an explanation but I'm curious. When I tried to research about how to transfer data I arrived at the conclusion that using a protocol such as UART (which is asynchronous) won't be good enough for my needs and that I should be using something else such as SPI. Can you please explain to me why would 115200 baud rate would suffice? It's also apparent that this device can reach a faster baud rate from looking at the device manager on windows. picture is attached
-
3 minutes ago, reddish said:
Okay I will write up a bit about serial communications
Thank you 🙏
-
1 minute ago, GalD101 said:
How can I check this? I remember you said the relation between baud and Hz is a factor of 2
Oh i get it now
-
8 minutes ago, reddish said:
If you can confirm that you made a 57600 baud signal
How can I check this? I remember you said the relation between baud and Hz is a factor of 2
-
8 minutes ago, reddish said:
Windows
I have windows currently but can switch to Linux as well
-
-
2 minutes ago, reddish said:
>> That's something
Indeed, but what?
I have no idea what I'm looking at. Some context with the scope pictures is needed.My mistake, it's similar to the program you wrote but I changed the values of HI and LO to 868 and NUM_COUNTER_BITS to 11
localparam HI = 868;
localparam LO = 868;
localparam NUM_COUNTER_BITS = 11; -
12 minutes ago, reddish said:
I did? I just tied it to 0 for the time being.
This is what I saw in your file:
my_first_fsm fsm(
.CLK(CLK),
.FSM_OUT(PIO_OUT)
);
shouldn't it be
my_first_fsm fsm(
.CLK(CLK),
.RESET(0),
.FSM_OUT(PIO_OUT)
); -
How to use and manage memory with my FPGA?
in New Users Introduction
Posted
How should I create a "Hello World!" program? making it using the same logic I applied previously for the "UUUU" or "AAAA" seems cumbersome and also pretty bad in terms of memory (using a lot of bits for the counter).