I searched Wikipedia for it (always a reliable source) which listed that for HD sources it uses a tri-level sync. When I clicked on tri-level sync the first sentence said it was used for locking of HD video and in parenthesis (genlock). So how different is SPG versus Genlock? Sounds like they are similar.
An SPG is a Sync Pulse Generator. It will generate timing reference signals (HD Tri-level syncs, SD Black and Burst etc.) and usually will also generate colour bars for the studio, as well as other test signals. It will sometimes generate more than one feed of syncs, to allow some equipment that adds more delay to be referenced to an 'earlier' sync feed so that its output is co-timed with other gear that adds less delay that is referenced to 'later' syncs.
You will usually have two SPGs at least in a studio, running as a main and a backup (as it is one of the most vital pieces of kit), with a changeover switch selecting which is in circuit.
The SPG timing reference signals are distributed to camera CCUs, vision mixers, CGs, Frame synchronisers, VTRs, Disc servers etc. to ensure that all sources in the studio are correctly co-timed, so that as you cut between cameras, the images are 'in sync' without needing to constantly use frame synchronisers (which can add a frame of delay).
The action of locking a piece of equipment's internal sync generator to an external reference signal is often called 'Genlocking' and the input is sometimes (particularly on camcorders etc.) called 'Genlock'. It is so called because you are locking your internal sync generator to an external source.
In multi-studio operations SPGs themselves are usually genlocked to a master 'station syncs' feed.
What you almost certainly saw was the Studio B colour bars output, which was labelled as SPG (because it was generated by the SPG). This is often present on the studio output change-over switch to allow a studio to uniquely identify its output. (So if you are lining up with a Master Control you would put bars on your output to identify they had the correct feed. You wouldn't conventionally do this on the vision mixer as that could be present on multiple feeds from the studio. It will usually also route tone to line at the same time. As most studios have a Main and a Reserve feed output - you often put bars and tone on both, and then remove them from one (but not both) of the feeds to uniquely identify which is Main and which is Reserve (which is vital to know in cases of breakdown)
Most studios will have a lock-out facility that disables the "Bars to Line" switch from putting bars to line when the studio is put into 'Transmission' mode (i.e. the red lights are put on). This will sometimes also disable other functions, like loudspeaker talkback feeds from the gallery to the studio floor etc. which may only be needed in rehearsal and could be positively dangerous during transmission.
At the BBC, until the closure of the analogue network transmission area, the 'transmission' mode in
TVC studios was actually remotely controlled from Master Control (aka Pres) so that when they put you on-air, your studio at TV Centre actually got a Tally feed from the MCR playout area that switched on your red lights and disabled bars to line. The feed wasn't a straight tally from the MCR mixer as it was usually flashed at 2'00" to TX etc. It was also possible to locally enable 'transmission' or 'on-air' mode for local recordings, or for when the studio was working into a different broadcaster.