A magnetic resonance spectrometer networking method and magnetic resonance spectrometer
By using the data exchange subunit of the networking unit and FPGA firmware in the magnetic resonance spectrometer, the bit width is broadened and the data packets are merged, thereby solving the problems of data transmission bandwidth and delay in high-field or ultra-high-field magnetic resonance imaging systems, and realizing for efficient data transmission.
Patent Information
- Application Number
- CN202111392252.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-19
Smart Images

Figure CN114124723B
Abstract
Description
Background Art
[0002] MRI (magnetic resonance imaging) technology is a method that uses a constant magnetic field generated by a magnet to generate magnetic resonance signals by exciting the sample through a radio frequency system and a gradient system, and then collects and reconstructs the signals through a receiving and acquisition system to obtain a sample image. The magnetic resonance imaging system is composed of many subcomponents, including: magnetic resonance spectrometer, magnet, bed, gradient amplifier, water cooling, receiving coil and scanning operation table.
[0003] According to the difference in magnetic field strength, magnetic resonance imaging systems can be divided into low-field, high-field and ultra-high-field systems. It is generally believed that a low-field magnetic resonance imaging system refers to a system with a main magnetic field strength of less than 1.0T, such as 0.2T, 0.3T, 0.35T, etc.; a high-field magnetic resonance imaging system refers to a magnetic resonance imaging system with a main magnetic field strength greater than or equal to 1.0T and less than or equal to 3T, such as 1.5T, 3T, etc.; an ultra-high-field magnetic resonance imaging system refers to a magnetic resonance imaging system greater than 3T, such as 5T, 7T, 9.4T, etc.
[0004] Under the action of the main magnetic field of the MRI system, the nucleons of the subject undergo Zeeman splitting to form different energy levels. This energy level is not random, but is constrained by quantum behavior and presents a quantized state. The number of energy levels depends on the magnetic quantum number of the nucleon. For example, 1 1 H, because the magnetic quantum number is 1 / 2, only two energy levels can be formed, +1 / 2 and -1 / 2, which we call high energy state and low energy state respectively. The nucleons in these two energy states show a Boltzmann distribution, and the number of nucleons in the high energy state and the low energy state is very small. For every million nucleons, there is only a single-digit difference, so the magnetic resonance signal is very weak. However, this difference will increase with the increase of the magnetic field strength of the magnetic resonance imaging system, so high-field and ultra-high-field magnetic resonance imaging systems can bring about an increase in the intensity of the magnetic resonance signal, thereby improving the signal-to-noise ratio of the magnetic resonance signal, and then improving the resolution of the magnetic resonance image. As the magnetic field strength of the magnetic resonance imaging system increases, the resonance frequency increases accordingly, and the spectrum of the magnetic resonance signal also increases accordingly.
[0005] Larmor precession frequency W = KB, K depends on the type of nucleus. The magnetic field strength B of the magnetic resonance imaging system is the superposition of the main magnetic field and the gradient magnetic field. Therefore, for high-field or ultra-high-field magnetic resonance imaging systems, it is necessary to increase the bandwidth of the receiving coil or the number of coil channels per unit area to receive magnetic resonance signals. The general practice is to increase the number of receiving channels per unit area as the main method, and to increase the bandwidth of each receiving channel as the auxiliary method. In addition, as the main magnetic field strength increases, the energy absorbed by the subject increases, so it is necessary to increase the energy of the radio frequency system. The general practice is to use multiple channels to excite in parallel from different directions, which can increase the radio frequency energy and solve the magnetic field uniformity of the subject at the same time. Therefore, as the magnetic field strength of the magnetic resonance imaging system increases, the data bandwidth of the transmission chain of the magnetic resonance imaging system also increases. In addition, high-end magnetic resonance imaging systems have the function of whole-body imaging, which will greatly increase the number of channels of the resonance system and the data bandwidth of the magnetic resonance imaging system.
[0006] Assume that the MRI system has 128 channels, the bandwidth of the MRI signal is 1MHz, the sampling factor is 1.6, and the data bandwidth of each sampling point is 32 bits, of which the real part is 16 bits and the imaginary part is 16 bits. Then the bandwidth of the receiving link is 1MHz*1.6*32*128=6.5536Gbps. Assume that the transmitter updates the data at an interval of 1us, and updates the 32-bit frequency control word, 16-bit amplitude control word, and 16-bit phase control word each time. In the application of multi-layer excitation, each RF channel supports simultaneous excitation of 4 layers. For a system that supports 4 RF power amplifiers, the RF transmission bandwidth of the MRI system is 1Gbps. For a MRI system with a total bandwidth of approximately 7.55Gbps for the receiving and transmitting links, if the gradient system bandwidth, sequence data bandwidth, and synchronization data bandwidth are added, the total bandwidth of the MRI system will definitely be higher. Since the MRI system needs to be able to meet the requirements of the real-time feedback sequence, real-time feedback means low latency. In summary, a high-end high-field or ultra-high-field MRI system should be a system with high data bandwidth and low latency.
[0007] The magnetic resonance spectrometer is the core component of the magnetic resonance imaging system. It is used to generate corresponding radio frequency waveforms and gradient waveforms according to the user's input, reconstruct images based on the acquired magnetic resonance signals and present them to the user. A typical magnetic resonance spectrometer usually includes a scanning host, an image reconstruction computer, a control computer, a sequence computer, a radio frequency transmitting unit, a radio frequency receiving unit, a gradient waveform generating unit, and a monitoring and gating unit, such as Figure 1 The existing method of connecting various components of the magnetic resonance imaging system includes: the magnetic resonance imaging system includes an industrial computer component for controlling the computer, the mainboard of the industrial computer can provide a series of PCIE or PCI slots, and each component is connected to the industrial computer through a PCIE or PCI interface card, so the data bandwidth of the magnetic resonance imaging system depends on the performance of the industrial computer. Summary of the invention
[0008] In order to solve the existing technical problems, the embodiments of the present invention provide a magnetic resonance spectrometer networking method, a magnetic resonance spectrometer and a computer-readable storage medium.
[0009] In a first aspect, an embodiment of the present invention provides a networking method for a magnetic resonance spectrometer, including a scanning host, a networking unit, a scanning control computer, and an image reconstruction computer:
[0010] The scanning host generates a scanning sequence based on the received user input and sends it to the scanning control computer;
[0011] The scanning control computer compiles the scanning sequence into a hardware parameter sequence and sends it to the networking unit;
[0012] The networking unit exchanges the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence;
[0013] The radio frequency transmitting unit generates a radio frequency waveform according to the hardware parameter sequence, the gradient waveform generating unit generates a gradient waveform according to the hardware parameter sequence, and the radio frequency receiving unit converts the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and sends it to the networking unit;
[0014] The networking unit sends the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data;
[0015] The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit, and the data exchange subunit combines multiple input data into a new data packet by widening the bit width to perform transmission within the unit, and restores the data into the original data format for external output;
[0016] The scan control computer and the image reconstruction computer reconstruct image data according to the digital magnetic resonance data, and send the reconstructed image data to the scan host for presentation on the user interface.
[0017] In a second aspect, an embodiment of the present invention provides a magnetic resonance spectrometer, including a scanning host, a networking unit, a scanning control computer, and an image reconstruction computer, wherein the networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit:
[0018] The scanning host is used to generate a scanning sequence based on the received user input and send it to the scanning control computer;
[0019] The scanning control computer is used to compile the scanning sequence into a hardware parameter sequence and send it to the networking unit; and the image reconstruction computer reconstructs the image data according to the digital magnetic resonance data and sends it to the scanning host for presentation on the user interface;
[0020] The networking unit is used to exchange the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence; and to send the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data;
[0021] The radio frequency transmitting unit is used to generate a radio frequency waveform according to the hardware parameter sequence;
[0022] The gradient waveform generating unit is used to generate a gradient waveform according to the hardware parameter sequence;
[0023] The radio frequency receiving unit is used to convert the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and send it to the networking unit;
[0024] The data exchange subunit is used to merge multiple input data into a new data packet by widening the bit width to execute transmission within the unit, and restore it to the original data format for external output.
[0025] In a third aspect, an embodiment of the present invention provides a magnetic resonance spectrometer, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, and the computer program, when executed by the processor, implements the steps in the networking method of the magnetic resonance spectrometer as described above.
[0026] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the magnetic resonance spectrometer networking method as described above.
[0027] The method, magnetic resonance spectrometer and computer-readable storage medium provided by the embodiments of the present invention, and the networking method of the magnetic resonance spectrometer of the embodiments of the present invention, which widens the bit widths of multiple input data and merges them into new data packets through a networking unit, greatly improves data transmission efficiency, increases data transmission bandwidth, and meets the demand for higher and higher data transmission rate of the magnetic resonance spectrometer as the number of receiving channels and transmitting channels increases, and also meets the demand for wider and wider data transmission bandwidth of the magnetic resonance spectrometer. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0029] Figure 1 The schematic diagram of the structure of the existing magnetic resonance spectrometer is shown;
[0030] Figure 2 A schematic diagram of the structure of a magnetic resonance spectrometer according to an embodiment of the present invention is shown;
[0031] Figure 3 A schematic diagram showing the structure of a networking unit of a magnetic resonance spectrometer according to an embodiment of the present invention is shown;
[0032] Figure 4 A schematic diagram showing the internal structure of the FPGA firmware of the networking unit according to an embodiment of the present invention is shown;
[0033] Figure 5 A flow chart of a method for networking a magnetic resonance spectrometer provided by an embodiment of the present invention is shown;
[0034] Figure 6 A schematic diagram of the FPGA firmware memory block structure of the networking unit according to an embodiment of the present invention is shown;
[0035] Figure 7 A schematic diagram of the structure of a data exchange subunit in the FPGA firmware according to an embodiment of the present invention is shown;
[0036] Figure 8 A schematic diagram of a transformation process of widening the data bit width of a receive bus module according to an embodiment of the present invention is shown;
[0037] Fig. 9 A flow chart showing a method of merging a receive bus (receivebus) module into a new data packet by widening the bit width according to an embodiment of the present invention;
[0038] Fig.10 A flow chart showing a method for allocating memory resources according to an embodiment of the present invention is shown;
[0039] Fig.11 A flow chart showing the restoration of the sendbus module to the original data format according to an embodiment of the present invention is shown;
[0040] Fig.12 A schematic diagram showing the transformation process of the sendbus module in an embodiment of the present invention to restore the original data format;
[0041] Fig.13 A second structural schematic diagram of the magnetic resonance spectrometer according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0042] Embodiments of the present invention will be described below with reference to flowcharts and / or block diagrams of methods, apparatus, magnetic resonance spectrometers, and computer-readable storage media according to embodiments of the present invention.
[0043] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer-readable program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified by the boxes in the flowchart and / or block diagram.
[0044] These computer-readable program instructions may also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to work in a specific manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction device product including functions / operations specified in the blocks in the flowchart and / or block diagram.
[0045] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable data processing apparatus to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0046] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0047] like Figure 2 As shown, the magnetic resonance spectrometer of the embodiment of the present invention includes: a scanning host, an Ethernet switch, an image reconstruction computer, a scanning control computer, a networking unit, a radio frequency transmitting unit, a gradient waveform generating unit, a radio frequency receiving unit and other devices. The networking unit is connected to the scanning control computer, the radio frequency transmitting unit, the gradient waveform generating unit and the radio frequency receiving unit through a high-speed data interface, and the scanning host is connected to the scanning control computer through an Ethernet switch. The scanning control computer is connected to the networking unit through a PCIE communication card.
[0048] There can be one or more radio frequency receiving units, and the number of receiving channels of each radio frequency receiving unit can be 8, 16, 20, 24, 32, etc. according to actual needs. The total number of receiving channels of the magnetic resonance spectrometer can be selected according to the actual use of the high-field or ultra-high-field magnetic resonance spectrometer. For example, for a medical 1.5T magnetic resonance spectrometer, the actual number of receiving channels can be designed to be 16, 32 or 64; for a medical 3T magnetic resonance spectrometer, the actual number of receiving channels can be designed to be 64 or 128; for a medical 5T magnetic resonance spectrometer, the actual number of receiving channels can be designed to be 128 or 256, etc. In order to obtain a magnetic resonance signal with a higher signal-to-noise ratio, the radio frequency receiving unit can be arranged between the magnets.
[0049] There can be one or more RF transmitting units, and each RF transmitting unit can be designed as one, two or four channels. In order to support multi-layer excitation, each channel needs to be designed as baseband, intermediate frequency and radio frequency. If the total number of transmitting channels of the magnetic resonance spectrometer can be selected according to the actual use of the high-field or ultra-high-field magnetic resonance spectrometer, for a medical 1.5T magnetic resonance spectrometer, the actual number of transmitting channels can be designed as one; for a medical 3T magnetic resonance system, the actual number of transmitting channels can be designed as two; for a medical 5T magnetic resonance spectrometer, the actual number of transmitting channels can be designed as four. In order to reduce the path loss of the RF signal, the RF transmitting unit can be arranged between the magnets.
[0050] like Figure 3 As shown, the networking unit of the embodiment of the present invention includes FPGA firmware, high-speed data interface and high-precision clock. The high-precision clock is the system working clock, which has stable phase and accurate frequency. The clock signal is transmitted to each component through the clock interface as the clock source of each component. Each component can also be well synchronized due to the high-precision clock. For example, the system working clock of the embodiment of the present invention is 100M.
[0051] like Figure 4 As shown, the FPGA firmware of the networking unit mainly includes a data exchange subunit and a FIFO (First Input First Output) memory. The data exchange subunit is used to exchange business data from different ports to a designated port according to different categories of business data.
[0052] FIFO memory is the buffer link of the system and has the following functions:
[0053] (1) Cache continuous data streams to prevent data loss during machine access and storage operations;
[0054] (2) Data is centrally entered and stored, which can avoid frequent bus operations and reduce the burden on the CPU;
[0055] (3) Allow the system to perform DMA (direct memory access) operations to increase data transmission speed.
[0056] From the design requirements, the data exchange subunit is a high-speed switch, which requires a large amount of cache to cache data. In the prior art, the market capacity characteristics of magnetic resonance spectrometers determine that they will not adopt ASIC design, but only FPGA design.
[0057] The data load of the magnetic resonance spectrometer is very unbalanced. For example, the amount of business data received from the RF receiving unit is large, while the amount of control data sent to the RF receiving unit is small. The amount of business data sent to the RF transmitting unit is large. The RF transmitting unit converts the received business data (hardware parameter sequence) into a RF waveform and transmits it. The amount of control data sent from the RF transmitting unit is small.
[0058] In the above situation, in order to efficiently utilize the memory block resources inside the FPGA firmware and realize the high bandwidth performance of the magnetic resonance spectrometer, an embodiment of the present invention provides a networking method for a magnetic resonance spectrometer, such as Figure 5 As shown, including:
[0059] Step S501: The scanning host receives the user's input, generates a scanning sequence, and sends it to the scanning control computer;
[0060] Step S503: After receiving the scan sequence, the scan control computer compiles the scan sequence into a hardware parameter sequence and then sends it to the networking unit;
[0061] Step S505: the networking unit exchanges the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit, the gradient waveform generating unit and other devices according to the data type of the hardware parameter sequence;
[0062] In step S505, the hardware parameter sequence is mainly used to control the time when the RF receiving unit uploads data, the uploaded channel number, the size of the uploaded data, the number of local oscillator frequencies, etc.
[0063] Step S507: after receiving the hardware parameter sequence, the RF transmitting unit generates a RF waveform according to the hardware parameter sequence, the gradient waveform generating unit generates a gradient waveform according to the hardware parameter sequence, and the RF receiving unit collects analog magnetic resonance data according to the instruction of the hardware parameter sequence, converts the analog magnetic resonance data into digital magnetic resonance data and sends it to the networking unit;
[0064] Step S509: the networking unit sends the digital magnetic resonance data to the scan control computer according to the data type of the digital magnetic resonance data, and uploads the digital magnetic resonance data to the reconstruction application through the PCIE communication card;
[0065] In an embodiment of the present invention, a PCIE communication card is built into a scanning control computer and is used to connect the scanning control computer and the networking unit. The PCIE communication card is used for sending sequence data, uploading magnetic resonance data, and synchronizing the scanning control computer with other components of the magnetic resonance spectrometer (including the networking unit, the radio frequency transmitting unit, the gradient waveform generating unit, and the radio frequency receiving unit), together forming a magnetic resonance spectrometer as a whole.
[0066] Step S511: The reconstruction programs running on the scanning control computer and the image reconstruction computer communicate through the network of the Ethernet switch to reconstruct the image data;
[0067] Step S513: Send the reconstructed image data to the scanning host, which presents the image data on the user interface of the scanning host.
[0068] The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit and a FIFO memory. Figure 6 As shown, each high-speed data interface of the FPGA firmware corresponds to a head pointer and a tail pointer, and both the head pointer and the tail pointer contain a memory block number register and an address offset register, which are used to indicate the location information and offset information of the memory block. The head pointer is used for write operations, and the tail pointer is used for read operations.
[0069] exist Figure 6 In the example, Latency0 FIFO, i.e. 0-delay FIFO, means reading the output data of FIFO in the current clock cycle of the read control signal. Those skilled in the art should know that FIFO is generally implemented through memory blocks. When the read control signal is sent, FIFO needs at least one clock to output the data to be read, so the general FIFO will sacrifice the system bandwidth. Therefore, in the design process of high-bandwidth magnetic resonance spectrometers, 0-delay FIFO is often used. Its implementation is to add an output register to the output of FIFO, and then always pre-read a data into the output register. Therefore, since the register can output the current data, it is possible to obtain the data of FIFO in the current cycle of the read control signal.
[0070] LLM (Link List Memory) can realize dynamic allocation of resources on demand. Each memory block is assigned an address, which can be called a block address or a page address. Figure 6 The page.LLM in the page is used to dynamically allocate the page address so that the port that needs the memory block resources can obtain the memory block resources so that there are enough memory block resources to store data.
[0071] After the magnetic resonance spectrometer is powered on and initialized, the memory block numbers of the head pointer and the tail pointer are both empty, indicating that no memory block is allocated to each high-speed data interface during power-on initialization. All memory blocks in the FPGA firmware are free, and all pointers to free memory blocks are pushed into a FIFO memory called a cache.
[0072] The embodiment of the present invention also discloses a method for a data exchange subunit to widen the bit width of transmission data, including:
[0073] (1) Widen the bit width: combine several data into a new data, for example, combine two 32-bit data into a 64-bit data, or combine three 32-bit data into a 96-bit data, or combine four 32-bit data into a 128-bit data, so that the data exchange subunit can process more data bits in each clock unit;
[0074] (2) Increase the clock frequency: For example, switch the system working clock 100M to the core clock 250M of the data exchange subunit.
[0075] like Figure 7 As shown, the data exchange subunit includes n receive bus modules, n send bus modules, 1 cache input interface module, 1 LLM module, and 1 cache output interface module. The connection relationship between the above modules is as follows: Figure 8 As shown in Figure 1. Each high-speed data interface includes a receivebus module and a sendbus module.
[0076] like Figure 8 and Fig. 9 As shown, the receivebus module combines the data packets into new data packets by widening the bit width, including:
[0077] Step S901: the receivebus module combines the position information of the received data in the data packet (packet header, packet tail or intermediate data) into new data packet position information for caching;
[0078] by Figure 8 For example, the position information includes 0101 of the 0th data, 0100 of the 1st data, 0100 of the 2nd data, 0100 of the 3rd data, ..., 0100 of the 8th data, and 0110 of the 9th data. It can be seen from this that Figure 8The 0th data of the position information of the 10 data is 0101, the 9th data is 0110, and the other intermediate data is 0100. In other words, the position information of these 10 data only distinguishes the packet header and the packet tail, and the position information of other intermediate data remains consistent.
[0079] Step S903: the receivebus module widens the received data in the bit width direction and merges them into a new data packet;
[0080] It should be noted that in order for LLM to quickly find a complete data packet, the first data in the data packet can be placed at the low bit of the newly generated data packet. Here, it is assumed that the process of widening and merging data is to fill the data packet from the low bit to the high bit. If the data packet is filled from the high bit to the low bit, the first data should be placed at the high bit of the newly generated data packet.
[0081] Step S905: if there is still a vacant data filling position at the end of the data packet during the process of filling the data packet, fill the vacant position with 0;
[0082] Step S907: Switching the clock of the newly generated data packet from the system working clock to the core clock of the data exchange subunit;
[0083] Step S909: the encache module working in the core clock of the data exchange subunit sequentially polls the n receivebus modules and caches the data packets newly generated by the receivebus modules into the corresponding dynamic FIFO memories;
[0084] Step S911: The LLM module implements the management of the dynamic FIFO memory;
[0085] like Fig.10 As shown, the memory resource allocation method of the embodiment of the present invention includes:
[0086] Step S1001: Push the free memory block pointer of the FPGA firmware into the FIFO memory of the free memory block pointer;
[0087] Step S1003: when a high-speed data interface receives data, if the high-speed data interface has no available cache, the high-speed data interface will apply for memory block resources;
[0088] Step S1005: After applying for the memory block, the received data will be written into the memory block;
[0089] Step S1007: If a high-speed data interface receives a complete data packet, the data packet will be read by the data exchange subunit and sent to the corresponding destination high-speed data interface;
[0090] Step S1009: If the data of a certain memory block is read empty, the memory block will be released, and the pointer of the memory block will be pushed into the free memory block pointer FIFO memory.
[0091] Step S913: the decache module calls out the corresponding data packet and sends it to the corresponding sendbus module according to the completeness of the data packet in the dynamic FIFO memory and the status of the sendbus module.
[0092] In step S913, the state of the sendbus module includes whether the sendbus module is in a state where it can receive data (indicated by the T1AF signal), for example, whether the sendbus module has an idle FIFO memory. Therefore, when the decache module determines that the sendbus module is in a state where it can receive data, it sends the complete data packet in the dynamic FIFO memory to the corresponding sendbus module.
[0093] like Fig.11 and Fig.12 As shown in the figure, the steps of restoring the sendbus module to the original data format include:
[0094] Step S1101: the sendbus module switches the clock of the newly generated data packet from the core clock of the data exchange subunit to the system working clock;
[0095] Step S1103: the sendbus module splits the newly generated data packet into single data with data packet position information along a direction perpendicular to its bit width;
[0096] Step S1105: the sendbus module deletes the data packet location information of the single data and restores the single data to the original data format.
[0097] It should be noted that Figure 8 Displays the transformation process of data into data packets after being processed by the receivebus module. Fig.12 Displays the transformation process of the data packet back to data after being processed by the sendbus module. Figure 8 and Fig.12 In the example, it is assumed that the input data is 32 bits and the number of data is 10. The generated data packet is 144 bits, of which 128 bits are data payload and the other 16 bits are control information (head).
[0098] Therefore, the networking method of the magnetic resonance spectrometer in the embodiment of the present invention is more stable because of the presence of a networking unit that specifically acts as a switching device; the networking unit widens the bit width of multiple input data and merges them into a new data packet, which greatly improves the data transmission efficiency and increases the data transmission bandwidth, meeting the demand for higher and higher data transmission rate of the magnetic resonance spectrometer as the number of receiving channels and transmitting channels increases, and also meeting the demand for wider and wider data transmission bandwidth of the magnetic resonance spectrometer.
[0099] Therefore, the networking method of the magnetic resonance spectrometer in the embodiment of the present invention ensures the effective utilization of all memory blocks through the dynamic allocation management of the FPGA firmware memory blocks in the networking unit, and timely releases the memory block resources of the read-empty data, thereby solving the problem of data transmission delay of the existing magnetic resonance spectrometer and ensuring the timely processing of various transmission data by the networking unit.
[0100] Combination of the above Figures 2 to 12 , describes in detail the networking method of the magnetic resonance spectrometer according to the embodiment of the present invention, and will now be combined with Figure 2 and Fig.13 , a magnetic resonance spectrometer according to an embodiment of the present invention is described in detail.
[0101] Figure 2 FIG. 2 shows a schematic diagram of the structure of a magnetic resonance spectrometer provided by an embodiment of the present invention. Figure 2 As shown, the magnetic resonance spectrometer includes a scanning host, a networking unit, a scanning control computer, and an image reconstruction computer. The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit:
[0102] The scanning host is used to generate a scanning sequence based on the received user input and send it to the scanning control computer;
[0103] The scanning control computer is used to compile the scanning sequence into a hardware parameter sequence and send it to the networking unit; and the image reconstruction computer reconstructs the image data according to the digital magnetic resonance data and sends it to the scanning host for presentation on the user interface;
[0104] The networking unit is used to exchange the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence; and to send the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data;
[0105] The radio frequency transmitting unit is used to generate a radio frequency waveform according to the hardware parameter sequence;
[0106] The gradient waveform generating unit is used to generate a gradient waveform according to the hardware parameter sequence;
[0107] The radio frequency receiving unit is used to convert the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and send it to the networking unit;
[0108] The data exchange subunit is used to merge multiple input data into a new data packet by widening the bit width to execute transmission within the unit, and restore it to the original data format for external output.
[0109] Wherein, the data exchange subunit includes a receivebus module, and the receivebus module includes:
[0110] A position generation submodule, used for generating new data packet position information based on the position information of the received data in the data packet;
[0111] A data packet merging submodule, used for widening the received data in a bit width direction and merging them into a new data packet according to the data packet position information, and placing the first data in the data in a low or high position in the data packet;
[0112] The system clock switching submodule is used to switch the clock of the data packet from the system working clock to the core clock of the data exchange subunit.
[0113] Wherein, the data exchange subunit includes a sendbus module, and the sendbus module includes:
[0114] A core clock switching submodule, used for switching the clock of the data packet from the core clock of the data exchange subunit to the system working clock;
[0115] A data packet splitting submodule, used for splitting the data packet into single data with data packet position information along a direction perpendicular to the bit width;
[0116] The data format recovery submodule is used to delete the data packet location information of each of the data and restore the single data to the original data format.
[0117] The magnetic resonance spectrometer also includes:
[0118] A memory block push module, used for pushing the free memory block pointer of the FPGA firmware into the free memory block pointer FIFO memory;
[0119] A call receiving module, used for receiving a memory block call request issued by the high-speed data interface when the high-speed data interface receiving the data of the networking unit has no available cache;
[0120] A data writing module, used for writing the received data into the called memory block;
[0121] The pointer push module is used to release the memory block after the data of the memory block is read out, and push the pointer of the free block into the free memory block pointer FIFO memory.
[0122] Therefore, the magnetic resonance spectrometer of the embodiment of the present invention, through the networking unit, widens the bit width of multiple input data and merges them into a new data packet, thereby greatly improving the data transmission efficiency and increasing the data transmission bandwidth. This meets the demand for higher and higher data transmission rates of the magnetic resonance spectrometer as the number of receiving channels and transmitting channels increases, and also meets the demand for wider and wider data transmission bandwidths of the magnetic resonance spectrometer.
[0123] Therefore, the magnetic resonance spectrometer of the embodiment of the present invention ensures the effective use of all memory blocks through dynamic allocation management of the FPGA firmware memory blocks in the networking unit, and timely releases the memory block resources of the read-empty data, thereby solving the problem of data transmission delay in the existing magnetic resonance spectrometer and ensuring the timely processing of various transmission data by the networking unit.
[0124] In addition, an embodiment of the present invention further provides a magnetic resonance spectrometer, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are respectively connected via a bus. When the computer program is executed by the processor, each process of the above-mentioned magnetic resonance spectrometer networking method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0125] For details, see Fig.13 As shown, an embodiment of the present invention further provides an electronic device, which includes a bus 131 , a processor 132 , a transceiver 133 , a bus interface 134 , a memory 135 and a user interface 136 .
[0126] In the embodiment of the present invention, the electronic device further includes: a computer program stored in the memory 135 and executable on the processor 132, and when the computer program is executed by the processor 132, the following steps are implemented:
[0127] The scanning host generates a scanning sequence based on the received user input and sends it to the scanning control computer;
[0128] The scanning control computer compiles the scanning sequence into a hardware parameter sequence and sends it to the networking unit;
[0129] The networking unit exchanges the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence;
[0130] The radio frequency transmitting unit generates a radio frequency waveform according to the hardware parameter sequence, the gradient waveform generating unit generates a gradient waveform according to the hardware parameter sequence, and the radio frequency receiving unit converts the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and sends it to the networking unit;
[0131] The networking unit sends the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data;
[0132] The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit, and the data exchange subunit combines multiple input data into a new data packet by widening the bit width to perform transmission within the unit, and restores the data into the original data format for external output;
[0133] The scan control computer and the image reconstruction computer reconstruct image data according to the digital magnetic resonance data, and send the reconstructed image data to the scan host for presentation on the user interface.
[0134] Optionally, when the computer program is executed by the processor 132, the following steps may also be implemented:
[0135] Generating new data packet location information based on the location information of the received data in the data packet;
[0136] According to the data packet position information, the received data is widened in the bit width direction and merged into a new data packet, and the first data in the data is placed in a low position or a high position in the data packet;
[0137] The clock of the data packet is switched from the system working clock to the core clock of the data exchange subunit.
[0138] Optionally, when the computer program is executed by the processor 132, the following steps may also be implemented:
[0139] Switching the clock of the data packet from the core clock of the data exchange subunit to the system working clock;
[0140] Splitting the data packet into individual data with data packet position information along a direction perpendicular to the bit width;
[0141] The data packet location information of each of the data is deleted, and the single data is restored to the original data format.
[0142] Optionally, when the computer program is executed by the processor 132, the following steps may also be implemented:
[0143] Pushing the free memory block pointer of the FPGA firmware into the free memory block pointer FIFO memory;
[0144] When the high-speed data interface receiving the data of the networking unit has no available cache, receiving a memory block call request issued by the high-speed data interface;
[0145] Writing the received data into the called memory block;
[0146] If the data in the memory block is read empty, the memory block will be released, and the pointer of the free block will be pushed into the free memory block pointer FIFO memory.
[0147] The transceiver 133 is used to receive and send data under the control of the processor 132 .
[0148] exist Fig.13 In the embodiment, a bus architecture (represented by bus 131) is shown. Bus 131 may include any number of interconnected buses and bridges, and bus 131 connects various circuits including one or more processors represented by processor 132 and memory represented by memory 135.
[0149] Bus 131 represents one or more of any of several types of bus structures, including a memory bus and memory controller, a peripheral bus, an Accelerate Graphical Port (AGP), a processor, or a local bus using any of a variety of bus architectures. By way of example and not limitation, such architectures include: Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA), Peripheral Component Interconnect (PCI) bus.
[0150] The processor 132 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processors include: a general-purpose processor, a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a programmable logic array (PLA), a microcontroller unit (MCU) or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. For example, the processor may be a single-core processor or a multi-core processor, and the processor may be integrated into a single chip or located on multiple different chips.
[0151] The processor 132 may be a microprocessor or any conventional processor. The method steps disclosed in conjunction with the embodiments of the present invention may be directly executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a readable storage medium known in the art, such as a random access memory (RAM), a flash memory (FlashMemory), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a register, etc. The readable storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware.
[0152] The bus 131 may also connect various other circuits such as peripheral devices, voltage regulators or power management circuits, and the bus interface 134 provides an interface between the bus 131 and the transceiver 133, which are well known in the art. Therefore, the embodiment of the present invention will not be further described.
[0153] The transceiver 133 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. For example, the transceiver 133 receives external data from other devices, and the transceiver 133 is used to send data processed by the processor 132 to other devices. Depending on the nature of the computer system, a user interface 136 may also be provided, such as a touch screen, a physical keyboard, a display, a mouse, a speaker, a microphone, a trackball, a joystick, or a stylus.
[0154] It should be understood that in an embodiment of the present invention, the memory 135 may further include a memory remotely arranged relative to the processor 132, and these remotely arranged memories may be connected to the server through a network. One or more parts of the above-mentioned network may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless local area network (WLAN), a wide area network (WAN), a wireless wide area network (WWAN), a metropolitan area network (MAN), the Internet, a public switched telephone network (PSTN), a plain old telephone service network (POTS), a cellular telephone network, a wireless network, a wireless fidelity (Wi-Fi) network, and a combination of two or more of the above-mentioned networks. For example, the cellular telephone network and the wireless network can be a Global System for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Worldwide Interoperability for Microwave Access (WiMAX) system, a General Packet Radio Service (GPRS) system, a Wideband Code Division Multiple Access (WCDMA) system, a Long Term Evolution (LTE) system, a LTE Frequency Division Duplex (FDD) system, a LTE Time Division Duplex (TDD) system, an Advanced Long Term Evolution (LTE-A) system, a Universal Mobile Telecommunications (UMTS) system, an Enhanced Mobile Broadband (Enhance Mobile Broadband, eMBB) system, a massive Machine Type of Communication (mMTC) system, an Ultra-Reliable Low Latency Communications (UltraReliable Low Latency Communications, uRLLC) system, etc.
[0155] It should be understood that the memory 135 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory includes: Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable Programmable ROM (EEPROM) or Flash Memory.
[0156] Volatile memory includes: Random Access Memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as: Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM) and Direct Rambus RAM (DRRAM). The memory 135 of the electronic device described in the embodiments of the present invention includes but is not limited to the above and any other suitable types of memory.
[0157] In the embodiment of the present invention, the memory 135 stores the following elements of the operating system 1351 and the application program 1352: executable modules, data structures, or subsets thereof, or extended sets thereof.
[0158] Specifically, the operating system 1351 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 1352 includes various application programs, such as a media player (Media Player) and a browser (Browser), which are used to implement various application services. The program for implementing the method of the embodiment of the present invention may be included in the application 1352. The application 1352 includes applets, objects, components, logic, data structures, and other computer system executable instructions that perform specific tasks or implement specific abstract data types.
[0159] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned magnetic resonance spectrometer networking method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0160] Specifically, when the computer program is executed by a processor, the following steps can be implemented:
[0161] The scanning host generates a scanning sequence based on the received user input and sends it to the scanning control computer;
[0162] The scanning control computer compiles the scanning sequence into a hardware parameter sequence and sends it to the networking unit;
[0163] The networking unit exchanges the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence;
[0164] The radio frequency transmitting unit generates a radio frequency waveform according to the hardware parameter sequence, the gradient waveform generating unit generates a gradient waveform according to the hardware parameter sequence, and the radio frequency receiving unit converts the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and sends it to the networking unit;
[0165] The networking unit sends the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data;
[0166] The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit, and the data exchange subunit combines multiple input data into a new data packet by widening the bit width to perform transmission within the unit, and restores the data into the original data format for external output;
[0167] The scan control computer and the image reconstruction computer reconstruct image data according to the digital magnetic resonance data, and send the reconstructed image data to the scan host for presentation on the user interface.
[0168] Optionally, when the computer program is executed by a processor, the following steps may also be implemented:
[0169] Generating new data packet location information based on the location information of the received data in the data packet;
[0170] According to the data packet position information, the received data is widened in the bit width direction and merged into a new data packet, and the first data in the data is placed in a low position or a high position in the data packet;
[0171] The clock of the data packet is switched from the system working clock to the core clock of the data exchange subunit.
[0172] Optionally, when the computer program is executed by a processor, the following steps may also be implemented:
[0173] Switching the clock of the data packet from the core clock of the data exchange subunit to the system working clock;
[0174] Splitting the data packet into individual data with data packet position information along a direction perpendicular to the bit width;
[0175] The data packet location information of each of the data is deleted, and the single data is restored to the original data format.
[0176] Optionally, when the computer program is executed by a processor, the following steps may also be implemented:
[0177] Pushing the free memory block pointer of the FPGA firmware into the free memory block pointer FIFO memory;
[0178] When the high-speed data interface receiving the data of the networking unit has no available cache, receiving a memory block call request issued by the high-speed data interface;
[0179] Writing the received data into the called memory block;
[0180] If the data in the memory block is read empty, the memory block will be released, and the pointer of the free block will be pushed into the free memory block pointer FIFO memory.
[0181] Computer readable storage media include: permanent and non-permanent, removable and non-removable media, which are tangible devices that can retain and store instructions for use by instruction execution devices. Computer readable storage media include: electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, and any suitable combination of the above. Computer readable storage media include: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassette storage, magnetic tape disk storage or other magnetic storage devices, memory sticks, mechanical encoding devices (such as punched cards or raised structures in grooves with instructions recorded thereon) or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined in the embodiments of the present invention, computer-readable storage media do not include temporary signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (such as light pulses passing through fiber optic cables), or electrical signals transmitted through wires.
[0182] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0183] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. The computer program instructions include: assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages, the programming language includes an object-oriented programming language, such as Smalltalk, C++, and a procedural programming language, such as C language or a similar programming language.
[0184] When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated, and the computer may be a computer, a special computer, a computer network or other editable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example: the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, twisted pair, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a magnetic disk, a magnetic tape), an optical medium (e.g., an optical disk) or a semiconductor medium (e.g., a solid-state drive (SSD)), etc. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.
[0185] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments of the present invention, and will not be repeated here.
[0186] In the several embodiments provided in the present application, it should be understood that the disclosed devices, electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0187] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one location or distributed on multiple network units. Some or all of the units may be selected according to actual needs to solve the problem to be solved by the embodiments of the present invention.
[0188] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0189] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (including: a personal computer, a server, a data center or other network device) to perform all or part of the steps of the method described in each embodiment of the present invention. The above-mentioned storage medium includes various media that can store program codes as listed above.
[0190] The above is only a specific implementation of the embodiment of the present invention, but the protection scope of the embodiment of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the embodiment of the present invention, which should be included in the protection scope of the embodiment of the present invention. Therefore, the protection scope of the embodiment of the present invention should be based on the protection scope of the claims.
Claims
1. A method for networking a magnetic resonance spectrometer, characterized in that: Including scanning host, networking unit, scanning control computer, image reconstruction computer: The scanning host generates a scanning sequence based on the received user input and sends it to the scanning control computer; The scanning control computer compiles the scanning sequence into a hardware parameter sequence and sends it to the networking unit; The networking unit exchanges the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence; The radio frequency transmitting unit generates a radio frequency waveform according to the hardware parameter sequence, the gradient waveform generating unit generates a gradient waveform according to the hardware parameter sequence, and the radio frequency receiving unit converts the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and sends it to the networking unit; The networking unit sends the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data; The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit, and the data exchange subunit combines multiple input data into a new data packet by widening the bit width to perform transmission within the unit, and restores the data into the original data format for external output; The scanning control computer and the image reconstruction computer reconstruct image data according to the digital magnetic resonance data, and send the image data to the scanning host for presentation on the user interface; The data exchange subunit includes a receiving bus module, and the step of merging into a new data packet by widening the bit width of the receiving bus module includes: Generating new data packet location information based on the location information of the received data in the data packet; According to the data packet position information, the received data is widened and merged in the bit width direction into a new data packet, and the first data in the data is placed in the low or high position in the data packet; if the process of widening and merging the data is to fill the data packet from the low position to the high position, the first data in the data packet is placed in the low position of the newly generated data packet; if the process of widening and merging the data is to fill the data packet from the high position to the low position, the first data in the data packet is placed in the high position of the newly generated data packet; Switching the clock of the data packet from the system working clock to the core clock of the data exchange subunit; Also includes: Pushing the free memory block pointer of the FPGA firmware into the free memory block pointer FIFO memory; When the high-speed data interface receiving the data of the networking unit has no available cache, receiving a memory block call request issued by the high-speed data interface; Writing the received data into the called memory block; If the data in the memory block is read empty, the memory block will be released, and the pointer of the free block will be pushed into the free memory block pointer FIFO memory.
2. The method according to claim 1, characterized in that The data exchange subunit includes a sending bus module, and the step of restoring the sending bus module to the original data format includes: Switching the clock of the data packet from the core clock of the data exchange subunit to the system working clock; Splitting the data packet into individual data with data packet position information along a direction perpendicular to the bit width; The data packet location information of each of the data is deleted, and the single data is restored to the original data format.
3. A magnetic resonance spectrometer, characterized in that: It includes a scanning host, a networking unit, a scanning control computer, and an image reconstruction computer. The networking unit includes an FPGA firmware, and the FPGA firmware includes a data exchange subunit: The scanning host is used to generate a scanning sequence based on the received user input and send it to the scanning control computer; The scanning control computer is used to compile the scanning sequence into a hardware parameter sequence and send it to the networking unit; and an image reconstruction computer reconstructing image data according to the digital magnetic resonance data, and sending the image data to the scanning host for presentation on a user interface; The networking unit is used to exchange the hardware parameter sequence to the radio frequency receiving unit, the radio frequency transmitting unit and the gradient waveform generating unit according to the data type of the hardware parameter sequence; and to send the digital magnetic resonance data to the scanning control computer according to the data type of the digital magnetic resonance data; The radio frequency transmitting unit is used to generate a radio frequency waveform according to the hardware parameter sequence; The gradient waveform generating unit is used to generate a gradient waveform according to the hardware parameter sequence; The radio frequency receiving unit is used to convert the received analog magnetic resonance signal into digital magnetic resonance data according to the instruction of the hardware parameter sequence and send it to the networking unit; The data exchange subunit is used to merge multiple input data by widening the bit width The new data packet is converted into a new data packet for transmission within the unit, and then restored into the original data format for external output; The data exchange subunit includes a receiving bus module, and the receiving bus module includes: A position generation submodule, used for generating new data packet position information based on the position information of the received data in the data packet; A data packet merging submodule, used for widening and merging the received data in the bit width direction into a new data packet according to the data packet position information, and placing the first data in the data at a low or high position in the data packet; if the process of widening and merging the data is to fill the data packet from the low position to the high position, the first data in the data packet is placed at the low position of the newly generated data packet; if the process of widening and merging the data is to fill the data packet from the high position to the low position, the first data in the data packet is placed at the high position of the newly generated data packet; A system clock switching submodule, used for switching the clock of the data packet from the system working clock to the core clock of the data exchange subunit; Also includes: A memory block push module, used for pushing the free memory block pointer of the FPGA firmware into the free memory block pointer FIFO memory; A call receiving module, used for receiving a memory block call request issued by the high-speed data interface when the high-speed data interface receiving the data of the networking unit has no available cache; A data writing module, used for writing the received data into the called memory block; The pointer push module is used to release the memory block after the data of the memory block is read out, and push the pointer of the free block into the free memory block pointer FIFO memory.
4. The magnetic resonance spectrometer according to claim 3, characterized in that The data exchange subunit includes a sending bus module, and the sending bus module includes: A core clock switching submodule, used for switching the clock of the data packet from the core clock of the data exchange subunit to the system working clock; A data packet splitting submodule, used for splitting the data packet into single data with data packet position information along a direction perpendicular to the bit width; The data format recovery submodule is used to delete the data packet location information of each of the data and restore the single data to the original data format.
5. A magnetic resonance spectrometer, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, wherein: When the computer program is executed by the processor, the steps in the method for networking a magnetic resonance spectrometer according to any one of claims 1 to 2 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method for networking a magnetic resonance spectrometer according to any one of claims 1 to 2 are implemented.
