Sachin Vijay Sonawane <[EMAIL PROTECTED]> writes: > In .md file, while writing Function-unit specifications, we have to > define an attribute called "simultaneity". I am still confused to get > the correct meaning it. Can anyone plz elaborate on it? I have found > the following definition from GCC manual. > > "simultaneity specifies the maximum number of insns that can be > executing in each instance of the function unit simultaneously or zero > if the unit is pipelined and has no limit."
First I'll note that all that define_function_unit is gone in the current compiler, along with its documentation. The new approved approach is to use define_cpu_unit and define_insn_reservation. That said, simultaneity is attempting to describe a feature of processor functional units. Consider a multiplier. Let's say that the multiplier takes several cycles to complete the operation. What happens if a second multiply instruction comes along while the multiplier is working? One option is that the second multiply instruction stalls until the first one is complete (for example, the XScale works this way). In this case, the multiply unit has a "simultaneity" of 1: one instruction may occupy the functional unit at one time. Another option is that the multiplier is fully pipelined, and the second multiply instruction simply begins executing in the pipeline (e.g., Pentium II, many other high end processors). In this case, the multiply unit has a "simultaneity" of 0, meaning that there is no limit on the number of instructions which may occupy the functional unit at one time. It is of course possible to have two non-pipelined multiplier units, in which case a second multiply instruction would begin executing immediately, while a third one would be stalled until one of them completed. For example, I believe that the Athlon has three floating point multiplication units, and therefore has a "simultaneity" of 3. Hope this helps. Ian