Jump to content

GalD101

Members
  • Posts

    107
  • Joined

  • Last visited

Posts posted by GalD101

  1. Hurray!

    image.thumb.png.cf495d447634b8a6f1917d74e2f059a2.png

     

    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?

    finite_state_machine.sv

    IMG_2776.jpeg

    note: doing this instead of data structures hw because it's fun lol

  2. "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."

  3. 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

  4. 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 parity  stop 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

  5. 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

  6. 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;

  7. 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

    baud rate.png

  8. 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;

×
×
  • Create New...